[tor-commits] [dip/master] Add upgrade pipeline to new output

hiro at torproject.org hiro at torproject.org
Thu Nov 21 10:02:52 UTC 2019


commit 8ff807b7134ec009752cab5db319e5ff5123bc8a
Author: Bastian Blank <waldi at debian.org>
Date:   Tue Nov 5 23:14:19 2019 +0100

    Add upgrade pipeline to new output
---
 .../gitlab-workhorse-2-upgrade-pipeline.json       | 110 +++++++++++++++++++++
 roles/system/logs/tasks/elasticsearch.yml          |   1 +
 2 files changed, 111 insertions(+)

diff --git a/roles/system/logs/files/elasticsearch/gitlab-workhorse-2-upgrade-pipeline.json b/roles/system/logs/files/elasticsearch/gitlab-workhorse-2-upgrade-pipeline.json
new file mode 100644
index 0000000..3268884
--- /dev/null
+++ b/roles/system/logs/files/elasticsearch/gitlab-workhorse-2-upgrade-pipeline.json
@@ -0,0 +1,110 @@
+{
+  "description": "Inject gitlab-workhorse log",
+  "processors": [
+    {
+      "remove": {
+        "field": "source",
+        "ignore_missing": true
+      }
+    },
+    {
+      "rename": {
+        "field": "offset",
+        "target_field": "log.offset"
+      }
+    },
+    {
+      "rename": {
+        "field": "gitlab-workhorse.geoip",
+        "target_field": "source.geo",
+        "ignore_missing": true
+      }
+    },
+    {
+      "rename": {
+        "field": "gitlab-workhorse.method",
+        "target_field": "http.request.method",
+        "ignore_missing": true
+      }
+    },
+    {
+      "rename": {
+        "field": "gitlab-workhorse.remote_ip",
+        "target_field": "source.ip",
+        "ignore_missing": true
+      }
+    },
+    {
+      "rename": {
+        "field": "gitlab-workhorse.referrer",
+        "target_field": "http.request.referrer",
+        "ignore_missing": true
+      }
+    },
+    {
+      "rename": {
+        "field": "gitlab-workhorse.status",
+        "target_field": "http.response.status_code",
+        "ignore_missing": true
+      }
+    },
+    {
+      "rename": {
+        "field": "gitlab-workhorse.uri",
+        "target_field": "url.original",
+        "ignore_missing": true
+      }
+    },
+    {
+      "rename": {
+        "field": "gitlab-workhorse.user_agent.original",
+        "target_field": "user_agent.original",
+        "ignore_missing": true
+      }
+    },
+    {
+      "rename": {
+        "field": "gitlab-workhorse.written",
+        "target_field": "http.response.body.bytes",
+        "ignore_missing": true
+      }
+    },
+    {
+      "rename": {
+        "field": "gitlab-workhorse.written_bytes",
+        "target_field": "http.response.body.bytes",
+        "ignore_missing": true
+      }
+    },
+    {
+      "urldecode": {
+        "field": "url.original",
+        "ignore_missing": true
+      }
+    },
+    {
+      "user_agent": {
+        "field": "user_agent.original",
+        "ignore_missing": true
+      }
+    },
+    {
+      "remove": {
+        "field": [
+          "gitlab-workhorse.duration_ms",
+          "gitlab-workhorse.host",
+          "gitlab-workhorse.level",
+          "gitlab-workhorse.msg",
+          "gitlab-workhorse.proto",
+          "gitlab-workhorse.remoteAddr",
+          "gitlab-workhorse.remote_addr",
+          "gitlab-workhorse.system",
+          "gitlab-workhorse.time",
+          "gitlab-workhorse.user_agent",
+          "gitlab-workhorse.version"
+        ],
+        "ignore_missing": true
+      }
+    }
+  ]
+}
diff --git a/roles/system/logs/tasks/elasticsearch.yml b/roles/system/logs/tasks/elasticsearch.yml
index 087e1e0..1805c3a 100644
--- a/roles/system/logs/tasks/elasticsearch.yml
+++ b/roles/system/logs/tasks/elasticsearch.yml
@@ -83,6 +83,7 @@
   - gitlab-workhorse-2
   - gitlab-workhorse-2-access
   - gitlab-workhorse-2-msg
+  - gitlab-workhorse-2-upgrade
   tags:
   - elasticsearch-data
 





More information about the tor-commits mailing list