Created
January 13, 2012 20:04
-
-
Save anewusername1/1608427 to your computer and use it in GitHub Desktop.
logstash/graylog2 setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
gelf { type => 'gelf' } | |
} | |
output { | |
mongodb { | |
host => '127.0.0.1' | |
database => 'rails_logs' | |
collection => "%{facility}" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
java -jar /opt/logstash/logstash-1.1.0-beta8.jar agent -f /etc/logstash.conf -d | |
echo "started logstash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dbpath=/opt/mongod/data | |
logpath=/var/log/mongod.log | |
logappend=true | |
fork=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get install openjdk-6-jdk openjdk-6-jre | |
# mongodb setup | |
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.2.tgz | |
mkdir -p /opt/mongod/data | |
wget -O /etc/mongod.conf https://raw.github.com/gist/1608427/02292b663e9cc3d4220a5f761f53e762523b6ca5/mongod.conf | |
mongod -f /etc/mongod.conf | |
# elastic search | |
wget -O /opt/elasticsearch-0.17.6.tar.gz https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.17.6.tar.gz | |
cd /opt | |
tar -xf elasticsearch-0.17.6.tar.gz | |
rm elasticsearch-0.17.6.tar.gz | |
cd elasticsearch | |
bin/elasticsearch | |
# logstash setup | |
rvm install jruby | |
mkdir -p /opt/logstash | |
wget -O /opt/logstash/logstash-1.1.0-beta8.jar http://semicomplete.com/files/logstash/logstash-1.1.0beta8-monolithic.jar | |
wget -O /etc/logstash.conf https://raw.github.com/gist/1608427/365d96fcb01e18c00f7437e5b0058e26cf6faa54/logstash.conf | |
wget -O /usr/local/sbin/logstash https://raw.github.com/gist/1608427/08dee96f5e11a286ff29f3234a5aa8743c87080a/logstash.sh | |
chmod +x /usr/local/sbin/logstash | |
logstash | |
# graylog2 setup | |
cd /opt | |
git clone https://github.com/Graylog2/graylog2-web-interface.git | |
cd graylog2-web-interface | |
cp config/mongoid.yml.example config/mongoid.yml | |
cp config/email.yml.example config/email.yml | |
cp config/indexer.yml.example config/indexer.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment