diff options
Diffstat (limited to 'extra')
-rw-r--r-- | extra/docker/elk/logstash-conf/logstash.conf | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/extra/docker/elk/logstash-conf/logstash.conf b/extra/docker/elk/logstash-conf/logstash.conf index 2b5a24e04..4a7b151d0 100644 --- a/extra/docker/elk/logstash-conf/logstash.conf +++ b/extra/docker/elk/logstash-conf/logstash.conf @@ -88,12 +88,21 @@ output { codec => rubydebug } - elasticsearch { - codec => "json" - hosts => [elasticsearch] - index => "logstash-%{+YYYY.MM.DD}" # creates daily indexes - doc_as_upsert => true + if [http_request_failure] { + elasticsearch { + codec => "json" + hosts => [elasticsearch] + index => "errors-%{+YYYY.MM.DD}" + doc_as_upsert => true + } + } else { + elasticsearch { + codec => "json" + hosts => [elasticsearch] + index => "logstash-%{+YYYY.MM.DD}" # creates daily indexes + doc_as_upsert => true + } } } |