Skip to content

Instantly share code, notes, and snippets.

View shudarshon's full-sized avatar
🎯
Focusing

Shudarshon Chaki shudarshon

🎯
Focusing
View GitHub Profile
@shudarshon
shudarshon / install_tsunami_UDP.sh
Last active July 7, 2017 16:08
This script installs Tsunami UDP utility program. This program transfer data with a very high speed. It is used in sp3edy data transfer between IoT devices and AWS S3 bucket or any cloud storage.
#!/bin/bash
apt-get install cvs automake make autoconf gcc git -y
cvs -z3 -d:pserver:anonymous@tsunami-udp.cvs.sf.net:/cvsroot/tsunami-udp co -P tsunami-udp
cd tsunami-udp
/bin/bash recompile.sh
make install
@shudarshon
shudarshon / docker_install.sh
Created July 7, 2017 16:11
This script installs docker and docker composer in Ubuntu. This script script can be used in provisioning Ubuntu/Debian based server.
#!/bin/bash
apt-get update
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
apt-get update
apt-get install -y docker-engine
systemctl enable docker
usermod -aG docker ubuntu
docker info
curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.11.2/docker-compose-$(uname -s)-$(uname -m)"
@shudarshon
shudarshon / 11-applog-filter.conf
Created July 7, 2017 16:17
This is a logstash output filter for kibana for a django application log based on grok filter. Using this output filter it is possible to parse the unstructured data in to something structured and queryable.
filter {
if [type] == "applog" {
grok {
match => { "message" => "%{SYSLOG5424SD} ([Ww]arning|WARNING|[Ee]rror|ERROR|[Ii]nfo|INFO) (%{SYSLOG5424SD} Not Found: %{URIPATH})?" }
add_field => [ "received_at", "%{@timestamp}" ]
add_field => [ "received_from", "%{host}" ]
}
syslog_pri { }
date {
match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
@shudarshon
shudarshon / mautic_setup.sh
Created July 7, 2017 16:25
This script is used for provisioning Mautic-automated marketing solution software in any Ubuntu distribution.
#!/bin/bash
#install docker
apt-get update
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
apt-get update
apt-get install -y docker-engine
systemctl enable docker
usermod -aG docker ubuntu
@shudarshon
shudarshon / netdata.conf
Last active July 7, 2017 16:32
This script installs Netdata in any Ubuntu 16.04 machine. Netdata is a monitoring tool which is used for real time server metrics.
# netdata configuration
#
# You can download the latest version of this file, using:
#
# wget -O /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
# or
# curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
#
# You can uncomment and change any of the options below.
# The value shown in the commented settings, is the default value.
@shudarshon
shudarshon / 1_lamp_fabfile.py
Last active July 7, 2017 16:41
This script installs LAMP stack in Ubuntu 16.04 which is based on fabric library of python.
from fabric.api import *
from fabric.operations import *
from fabric.contrib.project import rsync_project
from fabric.contrib.files import exists
import sys, os
abspath = lambda filename: os.path.join(
os.path.abspath(os.path.dirname(__file__)),
filename
@shudarshon
shudarshon / install_ngrok.sh
Created July 7, 2017 16:38
This script installs ngrok and creates a SSH tunnel in any Ubuntu 16.04 machine
!#/bin/bash
#download and unzip ngrok
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
#configure ngrok woth token
./ngrok authtoken TOKEN-TOKEN-TOKEN-TOKEN
ngrok tcp 22
@shudarshon
shudarshon / install_zabbix_agent.sh
Created July 7, 2017 16:44
This bash script installs zabbix server and agent for zabbix monitoring.
#!/bin/bash
apt-get update
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
apt-get update
apt-get install -y docker-engine
systemctl enable docker
usermod -aG docker ubuntu
docker info
curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.11.2/docker-compose-$(uname -s)-$(uname -m)"
@shudarshon
shudarshon / install_goaccess.py
Created July 7, 2017 17:00
This script Goaccess in Ubuntu 16.04 in automated way. Goaccess is used for web server metric monitoring from command line to webpage.
from fabric.api import *
from fabric.operations import *
from fabric.contrib.project import rsync_project
from fabric.contrib.files import exists
import sys, os
abspath = lambda filename: os.path.join(
os.path.abspath(os.path.dirname(__file__)),
filename
@shudarshon
shudarshon / fabfile.py
Last active July 7, 2017 17:11
This script installs a node.js app in Ubuntu 16.04 machine. It based of fabric library of python.
from fabric.api import *
from fabric.operations import *
from fabric.contrib.project import rsync_project
from fabric.contrib.files import exists
import sys, os
abspath = lambda filename: os.path.join(
os.path.abspath(os.path.dirname(__file__)),
filename