Last active
October 26, 2015 11:05
-
-
Save jgeek/cb60bd1c47a0dd469545 to your computer and use it in GitHub Desktop.
logstash commands
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
# 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