Last active
August 29, 2015 14:11
-
-
Save mandeepbal/d01e22abb5f40d479d9e to your computer and use it in GitHub Desktop.
logstash agent install
This file contains hidden or 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
sudo su - | |
rpm --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch | |
cat <<EOF > /etc/yum.repos.d/logstash.repo | |
[logstash-1.4] | |
name=logstash repository for 1.4.x packages | |
baseurl=http://packages.elasticsearch.org/logstash/1.4/centos | |
gpgcheck=1 | |
gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch | |
enabled=1 | |
EOF | |
yum clean all | |
yum install -y logstash | |
#create shipper.conf file | |
cat <<EOF > /etc/logstash/conf.d/shipper.conf | |
input { | |
file { | |
type => "syslog" | |
path => ["/var/log/**/*"] exclude => ["*.gz"] | |
} | |
} | |
output { | |
stdout { } | |
redis { | |
host => "172.31.50.117" | |
data_type => "list" | |
key => "logstash" | |
} | |
} | |
EOF | |
sudo service logstash start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment