EBernhardson has uploaded a new change for review.

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

Change subject: logstash: Utilize de_dot filter for sending to es 2.x
......................................................................

logstash: Utilize de_dot filter for sending to es 2.x

post process logs to make them es 2.x compatible by converting
dot's in the properties into underscores.

This needs to be tested on beta cluster before being merged.

Change-Id: I46d177ce1218eee6f86fa9468b917dc54b3d55da
Depends-On: Ibb83558
Bug: T138335
---
A files/logstash/filter-de_dot.conf
M manifests/role/logstash.pp
2 files changed, 16 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/295578/1

diff --git a/files/logstash/filter-de_dot.conf 
b/files/logstash/filter-de_dot.conf
new file mode 100644
index 0000000..6ae1081
--- /dev/null
+++ b/files/logstash/filter-de_dot.conf
@@ -0,0 +1,8 @@
+filter {
+  if "es" in [tags] {
+    de_dot {
+      add_tag => [ "es2" ]
+      remove_tag => [ "es" ]
+    }
+  }
+}
diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp
index 8656da6..f4d748a 100644
--- a/manifests/role/logstash.pp
+++ b/manifests/role/logstash.pp
@@ -125,6 +125,12 @@
         priority => 70,
     }
 
+    logstash::conf { 'filter_de_dot':
+        source   => 'puppet:///files/logstash/filter-do_dot.conf',
+        priority => 70,
+    }
+
+
     ## Outputs (90)
     # Template for Elasticsearch index creation
     file { '/etc/logstash/elasticsearch-template.json':
@@ -138,7 +144,7 @@
 
     logstash::output::elasticsearch { 'logstash':
         host            => '127.0.0.1',
-        guard_condition => '"es" in [tags]',
+        guard_condition => '"es in [tags]',
         manage_indices  => true,
         priority        => 90,
         template        => '/etc/logstash/elasticsearch-template.json',
@@ -150,7 +156,7 @@
             template_name   => 'logstash',
             index_prefix    => 'logstash',
             host            => $logstash_alt_host,
-            guard_condition => '"es" in [tags]',
+            guard_condition => '"es2" in [tags]',
             manage_indices  => true,
             priority        => 90,
             template        => '/etc/logstash/elasticsearch-template.json',

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

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

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

Reply via email to