Merge changes I54ea0dc6,If352b7db,I7b8221ac,Idcfb7c5d
[clamp.git] / extra / docker / elk / logstash-conf / logstash.conf
index 2b5a24e..dec47b3 100644 (file)
@@ -28,7 +28,7 @@ input {
         }
         socket_timeout => 30
         request_timeout => 30
-        interval => 15
+        interval => 60
         codec => "plain"
   }
 }
@@ -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
 
+        }
     }
 
 }