Gage has submitted this change and it was merged.

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(-)

Approvals:
  Gage: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I20c08a6c6c4c7ea391b04377c78badf3551893d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Gage <jger...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to