Browse Source

Fix logstash loadavg (xpack cases) (#90494)

* Fix logstash loadavg types

* Reformat logstash templates

There was some inconsistent indentation, so I re-formatted the files using intellij.

* Update docs/changelog/90494.yaml

* Include changelog notes about rollover.

* Asciidoc, not markdown
Mat Schaffer 3 years ago
parent
commit
a3ceca61a7

+ 16 - 0
docs/changelog/90494.yaml

@@ -0,0 +1,16 @@
+pr: 90494
+summary: Fix logstash loadavg (xpack cases)
+area: Monitoring
+type: bug
+issues: []
+highlight:
+  title: "Stack Monitoring: Logstash load average type fixed for metricbeat collection"
+  body: |-
+    Previously, the templates for ingesting logstash load average using metricbeat were set to `long`. This provides only an integer graph.
+
+    The type has been corrected to `half_float`. You can force a rollover to see the change immediately or wait for the next ILM rollover.
+
+    [source,console]
+    ----
+    POST .monitoring-logstash-8-mb/_rollover
+    ----

+ 5 - 5
x-pack/plugin/core/src/main/resources/monitoring-logstash-mb.json

@@ -146,10 +146,10 @@
                               "type": "nested",
                               "properties": {
                                 "name": {
-                                    "type": "keyword"
+                                  "type": "keyword"
                                 },
                                 "value": {
-                                    "type": "long"
+                                  "type": "long"
                                 }
                               }
                             }
@@ -164,13 +164,13 @@
                             "load_average": {
                               "properties": {
                                 "5m": {
-                                  "type": "long"
+                                  "type": "half_float"
                                 },
                                 "15m": {
-                                  "type": "long"
+                                  "type": "half_float"
                                 },
                                 "1m": {
-                                  "type": "long"
+                                  "type": "half_float"
                                 }
                               }
                             }

+ 16 - 6
x-pack/plugin/core/src/main/resources/monitoring-logstash.json

@@ -271,7 +271,7 @@
                     "out": {
                       "type": "long"
                     },
-                    "duration_in_millis":{
+                    "duration_in_millis": {
                       "type": "long"
                     },
                     "queue_push_duration_in_millis": {
@@ -301,11 +301,21 @@
                     "id": {
                       "type": "keyword"
                     },
-                    "pipeline_ephemeral_id": { "type": "keyword" },
-                    "events_in": { "type": "long" },
-                    "events_out": { "type": "long" },
-                    "duration_in_millis": { "type": "long" },
-                    "queue_push_duration_in_millis": { "type": "long" },
+                    "pipeline_ephemeral_id": {
+                      "type": "keyword"
+                    },
+                    "events_in": {
+                      "type": "long"
+                    },
+                    "events_out": {
+                      "type": "long"
+                    },
+                    "duration_in_millis": {
+                      "type": "long"
+                    },
+                    "queue_push_duration_in_millis": {
+                      "type": "long"
+                    },
                     "long_counters": {
                       "type": "nested",
                       "properties": {