logstash/docs/static/filebeat_modules/nginx/error/pipeline.conf
Suyog Rao 51e3ec62b4 Add Logstash configs for filebeat modules (#6791)
* Add Logstash configs for filebeat modules

Hand transpiled Logstash configs for FB modules to be included in
the docs for 5.3.

See FB modules for more details: https://github.com/elastic/beats/tree/master/filebeat/module

* Fix newlines

* Remove multiline, fix bugs
2017-04-07 14:21:42 -07:00

29 lines
847 B
Text

input {
beats {
# The port to listen on for filebeat connections.
port => 5044
# The IP address to listen for filebeat connections.
host => "0.0.0.0"
}
}
filter {
grok {
match => { "message" => ["%{DATA:[nginx][error][time]} \[%{DATA:[nginx][error][level]}\] %{NUMBER:[nginx][error][pid]}#%{NUMBER:[nginx][error][tid]}: (\*%{NUMBER:[nginx][error][connection_id]} )?%{GREEDYDATA:[nginx][error][message]}"] }
remove_field => "message"
}
mutate {
rename => { "@timestamp" => "read_timestamp" }
}
date {
match => [ "[nginx][error][time]", "YYYY/MM/dd H:m:s" ]
remove_field => "[nginx][error][time]"
}
}
output {
elasticsearch {
hosts => localhost
manage_template => false
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"
}
}