BryanDavis has uploaded a new change for review.

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

Change subject: logstash: Use conditional instead of deprecated grep filter
......................................................................

logstash: Use conditional instead of deprecated grep filter

From startup logging: "The 'grep' plugin is no longer necessary now that
you can do if/elsif/else in logstash configs. This plugin will be
removed in the future. If you need to drop events, please use the drop
filter. If you need to take action based on a match, use an 'if' block
and the mutate filter. See the following URL for details on how to use
if/elsif/else in your logstash configs:
http://logstash.net/docs/1.4.2-modified/configuration";

Replace the deprecated grep filter with a conditional regex match and
a drop filter.

Change-Id: I20c08a6c6c4c7ea391b04377c78badf3551893d7
---
M files/logstash/filter-gelf.conf
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/171790/1

diff --git a/files/logstash/filter-gelf.conf b/files/logstash/filter-gelf.conf
index 0dcf485..31e3215 100644
--- a/files/logstash/filter-gelf.conf
+++ b/files/logstash/filter-gelf.conf
@@ -18,10 +18,10 @@
 
     if [type] == "Hadoop" {
       # Drop anything at level INFO to save space
-      grep {
-        match => { "message" => "INFO" }
-        remove_tag => [ "es" ]
+      if [message] =~ "INFO" {
+        drop {}
       }
+
       mutate {
         replace => [ "channel", "%{SourceSimpleClassName}" ]
       }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20c08a6c6c4c7ea391b04377c78badf3551893d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to