Request failure polluting results

Change-Id: I7b8221ace6df00c6239f102f365c8d6db0dce41a
Issue-ID: CLAMP-124
Signed-off-by: ac2550 <ac2550@intl.att.com>
diff --git a/extra/docker/elk/logstash-conf/logstash.conf b/extra/docker/elk/logstash-conf/logstash.conf
index 2b5a24e..4a7b151 100644
--- a/extra/docker/elk/logstash-conf/logstash.conf
+++ b/extra/docker/elk/logstash-conf/logstash.conf
@@ -88,12 +88,21 @@
         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
 
+        }
     }
 
 }