BryanDavis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/323351

Change subject: logstash: Add processing rules for MediaWiki's exception channel
......................................................................

logstash: Add processing rules for MediaWiki's exception channel

Bug: T136849
Change-Id: I7372dbff9e6fceb0852747348bdfe9bed3756258
---
M modules/role/files/logstash/filter-mediawiki.conf
1 file changed, 13 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/323351/1

diff --git a/modules/role/files/logstash/filter-mediawiki.conf 
b/modules/role/files/logstash/filter-mediawiki.conf
index 3373774..31b3e70 100644
--- a/modules/role/files/logstash/filter-mediawiki.conf
+++ b/modules/role/files/logstash/filter-mediawiki.conf
@@ -14,10 +14,21 @@
     }
 
     if [channel] == "exception" {
-      # Excluded because events are duplicated by exception-json
-      drop {}
+      mutate {
+        # Add a field to compute a checksum value based on message + file + 
line
+        add_field => [
+          "message_checksum", "%{message}|%{[exception][file]}"
+        ]
+      }
+      # Convert message_checksum field to md5 hash
+      anonymize {
+        fields => [ "message_checksum" ]
+        algorithm => "MD5"
+        key => "boringsalt"
+      }
     }
 
+    # TODO: remove this after exception channel is sent from MW side
     if [channel] == "exception-json" {
       # Parse message as json and put elements in event
       json {

-- 
To view, visit https://gerrit.wikimedia.org/r/323351
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7372dbff9e6fceb0852747348bdfe9bed3756258
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <bda...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to