mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
* 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
29 lines
847 B
Text
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]}"
|
|
}
|
|
}
|