Skip to content

Instantly share code, notes, and snippets.

@ssugar
ssugar / Graylog-Docker.md
Created September 20, 2015 06:52
Docker command to run Graylog

#####Graylog

docker run -t -e GRAYLOG_TIMEZONE=Asia/Ho_Chi_Minh -v /srv/graylog/data:/var/opt/graylog/data -v /srv/graylog/logs:/var/log/graylog -v /srv/graylog/plugins:/opt/graylog/plugin -p 9000:9000 -p 12201:12201 -p 12900:12900 -p 5555:5555/udp --name graylog2 graylog2/allinone
@ssugar
ssugar / ELK-Docker.md
Last active September 27, 2015 08:31
Docker commands to run ELK stack with data persistence and container linking

#####Elasticsearch docker run -d --name elasticsearch -v /srv/elasticsearch/config:/etc/elasticsearch -v /srv/elasticsearch/data:/usr/share/elasticsearch/data elasticsearch

#####Kibana docker run -d --name kibana --link elasticsearch:elasticsearch -p 5601:5601 kibana

#####Logstash Place the logstash.conf file in this gist into the container host's /srv/logstash/log folder, then run:

docker run -d --name logstash --link elasticsearch:elasticsearch -p 6666:6666 -v /srv/logstash/config:/config-dir -v /srv/logstash/log:/var/log/logstash logstash logstash -f /config-dir/logstash.conf

@ssugar
ssugar / gist:4162eaa1d638ec62051c
Last active August 29, 2015 14:21
Send Data from Logstash to Azure SQL Database

##Send Data from Logstash to Azure SQL Database##

Assuming that the ELK stack elasticsearch, logstash and kibana is already setup.

  • Create Azure SQL Database
  • Get the following information
  • Server Name
  • Database Name
  • Server Username
  • Server Password
@ssugar
ssugar / gist:34cefdb42c887eb8cd31
Last active August 29, 2015 14:19
Get Vagrant working with Azure

#Set up Vagrant to use Azure provider#

###Install vagrant-azure plugin### vagrant plugin install vagrant-azure

###Install openssl### chocolatey install openssl.light -y

###Set up Azure Management Certificate### openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout az_cert.pem -out az_cert.pem

@ssugar
ssugar / gist:cf1cfc1cbc733ff730f0
Last active August 29, 2015 14:14
Create Vagrant Windows Box for HyperV Provider

Most of this is taken from here. It also has more in-depth info.

###Download ISO###

###Install OS###

During the install create user vagrant with password vagrant

###Initial WinRM Setup###

@ssugar
ssugar / gist:284c7ed6a2cb764b3285
Last active August 29, 2015 14:14
Setup Vagrant Dev Environment on Windows 10

#Install Vagrant Bleeding Edge on Win 10#

###Install Chocolatey###

From elevated command prompt:

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin  

###Install Github for Windows###