Request failure polluting results 59/39659/1
authorac2550 <ac2550@intl.att.com>
Wed, 28 Mar 2018 12:41:44 +0000 (14:41 +0200)
committerac2550 <ac2550@intl.att.com>
Wed, 28 Mar 2018 12:41:44 +0000 (14:41 +0200)
Change-Id: I7b8221ace6df00c6239f102f365c8d6db0dce41a
Issue-ID: CLAMP-124
Signed-off-by: ac2550 <ac2550@intl.att.com>
extra/docker/elk/logstash-conf/logstash.conf

index 2b5a24e..4a7b151 100644 (file)
@@ -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
 
+        }
     }
 
 }