Skip to content

Instantly share code, notes, and snippets.

@jgeek
Last active October 26, 2015 11:05
Show Gist options
  • Save jgeek/cb60bd1c47a0dd469545 to your computer and use it in GitHub Desktop.
Save jgeek/cb60bd1c47a0dd469545 to your computer and use it in GitHub Desktop.
logstash commands
# verify config file
$ logstash -f first-pipeline.conf --configtest
# run logstash with config file
$ logstash -f first-pipeline.conf
# pipleline example:
$ for (( ; ; )) do nc localhost 3333 < tomcat_logs/localhost_access_log.2015-08-20.txt ;
sleep 1;done
input {
tcp {
type => "tomcat"
port => 3333
add_field => { "server" => "prod1" }
}
}
output {
stdout {}
}
$ logstash -f my_tomcat_filter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment