From: ac2550 Date: Wed, 28 Mar 2018 12:41:44 +0000 (+0200) Subject: Request failure polluting results X-Git-Tag: v2.0.0~78^2~2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=ba939626315ea48a9c41a8a4fd0b7c052d9dce00;p=clamp.git Request failure polluting results Change-Id: I7b8221ace6df00c6239f102f365c8d6db0dce41a Issue-ID: CLAMP-124 Signed-off-by: ac2550 --- diff --git a/extra/docker/elk/logstash-conf/logstash.conf b/extra/docker/elk/logstash-conf/logstash.conf index 2b5a24e0..4a7b151d 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 + } } }