From a3733063d7cbcd258f5c689e5d4409460c1dc882 Mon Sep 17 00:00:00 2001 From: Tudor Golubenco Date: Sat, 10 Jun 2017 00:12:57 +0200 Subject: [PATCH] Remove empty properties from the template files This were introduced in #3515, but I think they cause issues like the one in #4483, at least in recent versions of ES. We already removed these in master, but I didn't realize the 5.x branches are affected. Fixes #4483. --- CHANGELOG.asciidoc | 1 + filebeat/filebeat.template-es2x.json | 3 --- filebeat/filebeat.template-es6x.json | 3 --- filebeat/filebeat.template.json | 3 --- heartbeat/heartbeat.template-es2x.json | 3 --- heartbeat/heartbeat.template-es6x.json | 3 --- heartbeat/heartbeat.template.json | 3 --- libbeat/libbeat.template-es6x.json | 3 --- libbeat/scripts/generate_template.py | 7 ----- metricbeat/metricbeat.template-es2x.json | 24 ----------------- metricbeat/metricbeat.template-es6x.json | 24 ----------------- metricbeat/metricbeat.template.json | 24 ----------------- packetbeat/packetbeat.template-es2x.json | 33 ------------------------ packetbeat/packetbeat.template-es6x.json | 33 ------------------------ packetbeat/packetbeat.template.json | 33 ------------------------ winlogbeat/winlogbeat.template-es2x.json | 9 ------- winlogbeat/winlogbeat.template-es6x.json | 9 ------- winlogbeat/winlogbeat.template.json | 9 ------- 18 files changed, 1 insertion(+), 226 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index cfc338923fc..74692310cf8 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -30,6 +30,7 @@ https://github.com/elastic/beats/compare/v5.4.1...master[Check the HEAD diff] - Fix console output {pull}4045[4045] - Usage of field `_type` is now ignored and hardcoded to `doc`. {pull}3757[3757] +- Removed empty sections from the template files, causing indexing errors for array objects. {pull}4488[4488] *Filebeat* diff --git a/filebeat/filebeat.template-es2x.json b/filebeat/filebeat.template-es2x.json index 853cd011844..cf8555620eb 100644 --- a/filebeat/filebeat.template-es2x.json +++ b/filebeat/filebeat.template-es2x.json @@ -293,9 +293,6 @@ "index": "not_analyzed", "type": "string" }, - "fields": { - "properties": {} - }, "fileset": { "properties": { "module": { diff --git a/filebeat/filebeat.template-es6x.json b/filebeat/filebeat.template-es6x.json index f6206aec20f..09944a7d908 100644 --- a/filebeat/filebeat.template-es6x.json +++ b/filebeat/filebeat.template-es6x.json @@ -245,9 +245,6 @@ "ignore_above": 1024, "type": "keyword" }, - "fields": { - "properties": {} - }, "fileset": { "properties": { "module": { diff --git a/filebeat/filebeat.template.json b/filebeat/filebeat.template.json index ea406c7ee25..1e968751076 100644 --- a/filebeat/filebeat.template.json +++ b/filebeat/filebeat.template.json @@ -248,9 +248,6 @@ "ignore_above": 1024, "type": "keyword" }, - "fields": { - "properties": {} - }, "fileset": { "properties": { "module": { diff --git a/heartbeat/heartbeat.template-es2x.json b/heartbeat/heartbeat.template-es2x.json index ebd0188197a..4930f9a91ac 100644 --- a/heartbeat/heartbeat.template-es2x.json +++ b/heartbeat/heartbeat.template-es2x.json @@ -68,9 +68,6 @@ } } }, - "fields": { - "properties": {} - }, "host": { "ignore_above": 1024, "index": "not_analyzed", diff --git a/heartbeat/heartbeat.template-es6x.json b/heartbeat/heartbeat.template-es6x.json index 9f3152f62c6..599ed6c6442 100644 --- a/heartbeat/heartbeat.template-es6x.json +++ b/heartbeat/heartbeat.template-es6x.json @@ -55,9 +55,6 @@ } } }, - "fields": { - "properties": {} - }, "host": { "ignore_above": 1024, "type": "keyword" diff --git a/heartbeat/heartbeat.template.json b/heartbeat/heartbeat.template.json index 71ec45dc306..7c2b77ea2a2 100644 --- a/heartbeat/heartbeat.template.json +++ b/heartbeat/heartbeat.template.json @@ -58,9 +58,6 @@ } } }, - "fields": { - "properties": {} - }, "host": { "ignore_above": 1024, "type": "keyword" diff --git a/libbeat/libbeat.template-es6x.json b/libbeat/libbeat.template-es6x.json index ea57bf0f744..9af1a2d5747 100644 --- a/libbeat/libbeat.template-es6x.json +++ b/libbeat/libbeat.template-es6x.json @@ -36,9 +36,6 @@ } } }, - "fields": { - "properties": {} - }, "meta": { "properties": { "cloud": { diff --git a/libbeat/scripts/generate_template.py b/libbeat/scripts/generate_template.py index 9dfeb144706..71b21d7c6e9 100644 --- a/libbeat/scripts/generate_template.py +++ b/libbeat/scripts/generate_template.py @@ -305,13 +305,6 @@ def fill_field_properties(args, field, defaults, path): } }) - - properties[field["name"]] = { - "properties": {} - } - - - elif field.get("type") == "group": if len(path) > 0: path = path + "." + field["name"] diff --git a/metricbeat/metricbeat.template-es2x.json b/metricbeat/metricbeat.template-es2x.json index 24b16e829ff..4952a331969 100644 --- a/metricbeat/metricbeat.template-es2x.json +++ b/metricbeat/metricbeat.template-es2x.json @@ -771,9 +771,6 @@ "index": "not_analyzed", "type": "string" }, - "labels": { - "properties": {} - }, "name": { "ignore_above": 1024, "index": "not_analyzed", @@ -793,9 +790,6 @@ "ignore_above": 1024, "index": "not_analyzed", "type": "string" - }, - "tags": { - "properties": {} } } }, @@ -902,9 +896,6 @@ } } }, - "labels": { - "properties": {} - }, "size": { "properties": { "regular": { @@ -914,9 +905,6 @@ "type": "long" } } - }, - "tags": { - "properties": {} } } }, @@ -1028,9 +1016,6 @@ } } }, - "fields": { - "properties": {} - }, "haproxy": { "properties": { "info": { @@ -1672,9 +1657,6 @@ "insync_replica": { "type": "boolean" }, - "isr": { - "properties": {} - }, "leader": { "type": "long" }, @@ -3641,9 +3623,6 @@ "index": "not_analyzed", "type": "string" }, - "percpu": { - "properties": {} - }, "stats": { "properties": { "system": { @@ -3937,9 +3916,6 @@ } } }, - "env": { - "properties": {} - }, "fd": { "properties": { "limit": { diff --git a/metricbeat/metricbeat.template-es6x.json b/metricbeat/metricbeat.template-es6x.json index 25eb1964c91..c6604583060 100644 --- a/metricbeat/metricbeat.template-es6x.json +++ b/metricbeat/metricbeat.template-es6x.json @@ -763,9 +763,6 @@ "ignore_above": 1024, "type": "keyword" }, - "labels": { - "properties": {} - }, "name": { "ignore_above": 1024, "type": "keyword" @@ -783,9 +780,6 @@ "status": { "ignore_above": 1024, "type": "keyword" - }, - "tags": { - "properties": {} } } }, @@ -895,9 +889,6 @@ } } }, - "labels": { - "properties": {} - }, "size": { "properties": { "regular": { @@ -907,9 +898,6 @@ "type": "long" } } - }, - "tags": { - "properties": {} } } }, @@ -1024,9 +1012,6 @@ } } }, - "fields": { - "properties": {} - }, "haproxy": { "properties": { "info": { @@ -1656,9 +1641,6 @@ "insync_replica": { "type": "boolean" }, - "isr": { - "properties": {} - }, "leader": { "type": "long" }, @@ -3605,9 +3587,6 @@ "ignore_above": 1024, "type": "keyword" }, - "percpu": { - "properties": {} - }, "stats": { "properties": { "system": { @@ -3897,9 +3876,6 @@ } } }, - "env": { - "properties": {} - }, "fd": { "properties": { "limit": { diff --git a/metricbeat/metricbeat.template.json b/metricbeat/metricbeat.template.json index cd596c43225..c6a84240b61 100644 --- a/metricbeat/metricbeat.template.json +++ b/metricbeat/metricbeat.template.json @@ -766,9 +766,6 @@ "ignore_above": 1024, "type": "keyword" }, - "labels": { - "properties": {} - }, "name": { "ignore_above": 1024, "type": "keyword" @@ -786,9 +783,6 @@ "status": { "ignore_above": 1024, "type": "keyword" - }, - "tags": { - "properties": {} } } }, @@ -898,9 +892,6 @@ } } }, - "labels": { - "properties": {} - }, "size": { "properties": { "regular": { @@ -910,9 +901,6 @@ "type": "long" } } - }, - "tags": { - "properties": {} } } }, @@ -1027,9 +1015,6 @@ } } }, - "fields": { - "properties": {} - }, "haproxy": { "properties": { "info": { @@ -1659,9 +1644,6 @@ "insync_replica": { "type": "boolean" }, - "isr": { - "properties": {} - }, "leader": { "type": "long" }, @@ -3608,9 +3590,6 @@ "ignore_above": 1024, "type": "keyword" }, - "percpu": { - "properties": {} - }, "stats": { "properties": { "system": { @@ -3900,9 +3879,6 @@ } } }, - "env": { - "properties": {} - }, "fd": { "properties": { "limit": { diff --git a/packetbeat/packetbeat.template-es2x.json b/packetbeat/packetbeat.template-es2x.json index 8c711e9056a..bce1bedf2ba 100644 --- a/packetbeat/packetbeat.template-es2x.json +++ b/packetbeat/packetbeat.template-es2x.json @@ -33,9 +33,6 @@ "index": "not_analyzed", "type": "string" }, - "arguments": { - "properties": {} - }, "auto-delete": { "type": "boolean" }, @@ -94,9 +91,6 @@ "index": "not_analyzed", "type": "string" }, - "headers": { - "properties": {} - }, "if-empty": { "type": "boolean" }, @@ -574,9 +568,6 @@ } } }, - "supported": { - "properties": {} - }, "warnings": { "ignore_above": 1024, "index": "not_analyzed", @@ -864,9 +855,6 @@ "domloadtime": { "type": "long" }, - "fields": { - "properties": {} - }, "final": { "ignore_above": 1024, "index": "not_analyzed", @@ -888,9 +876,6 @@ }, "type": "string" }, - "headers": { - "properties": {} - }, "params": { "ignore_above": 1024, "index": "not_analyzed", @@ -910,9 +895,6 @@ "index": "not_analyzed", "type": "string" }, - "headers": { - "properties": {} - }, "phrase": { "ignore_above": 1024, "index": "not_analyzed", @@ -1020,9 +1002,6 @@ "initial": { "type": "long" }, - "keys": { - "properties": {} - }, "line": { "ignore_above": 1024, "index": "not_analyzed", @@ -1061,9 +1040,6 @@ "index": "not_analyzed", "type": "string" }, - "values": { - "properties": {} - }, "vbucket": { "type": "long" }, @@ -1096,9 +1072,6 @@ "flags": { "type": "long" }, - "keys": { - "properties": {} - }, "opaque": { "type": "long" }, @@ -1110,9 +1083,6 @@ "opcode_value": { "type": "long" }, - "stats": { - "properties": {} - }, "status": { "ignore_above": 1024, "index": "not_analyzed", @@ -1129,9 +1099,6 @@ "value": { "type": "long" }, - "values": { - "properties": {} - }, "version": { "ignore_above": 1024, "index": "not_analyzed", diff --git a/packetbeat/packetbeat.template-es6x.json b/packetbeat/packetbeat.template-es6x.json index 11c3f3ba4be..6cfb9368e94 100644 --- a/packetbeat/packetbeat.template-es6x.json +++ b/packetbeat/packetbeat.template-es6x.json @@ -26,9 +26,6 @@ "ignore_above": 1024, "type": "keyword" }, - "arguments": { - "properties": {} - }, "auto-delete": { "type": "boolean" }, @@ -79,9 +76,6 @@ "ignore_above": 1024, "type": "keyword" }, - "headers": { - "properties": {} - }, "if-empty": { "type": "boolean" }, @@ -498,9 +492,6 @@ } } }, - "supported": { - "properties": {} - }, "warnings": { "ignore_above": 1024, "type": "keyword" @@ -755,9 +746,6 @@ "domloadtime": { "type": "long" }, - "fields": { - "properties": {} - }, "final": { "ignore_above": 1024, "type": "keyword" @@ -774,9 +762,6 @@ "norms": false, "type": "text" }, - "headers": { - "properties": {} - }, "params": { "ignore_above": 1024, "type": "keyword" @@ -793,9 +778,6 @@ "ignore_above": 1024, "type": "keyword" }, - "headers": { - "properties": {} - }, "phrase": { "ignore_above": 1024, "type": "keyword" @@ -894,9 +876,6 @@ "initial": { "type": "long" }, - "keys": { - "properties": {} - }, "line": { "ignore_above": 1024, "type": "keyword" @@ -931,9 +910,6 @@ "ignore_above": 1024, "type": "keyword" }, - "values": { - "properties": {} - }, "vbucket": { "type": "long" }, @@ -964,9 +940,6 @@ "flags": { "type": "long" }, - "keys": { - "properties": {} - }, "opaque": { "type": "long" }, @@ -977,9 +950,6 @@ "opcode_value": { "type": "long" }, - "stats": { - "properties": {} - }, "status": { "ignore_above": 1024, "type": "keyword" @@ -994,9 +964,6 @@ "value": { "type": "long" }, - "values": { - "properties": {} - }, "version": { "ignore_above": 1024, "type": "keyword" diff --git a/packetbeat/packetbeat.template.json b/packetbeat/packetbeat.template.json index 77152000f9d..0751a6a7da3 100644 --- a/packetbeat/packetbeat.template.json +++ b/packetbeat/packetbeat.template.json @@ -29,9 +29,6 @@ "ignore_above": 1024, "type": "keyword" }, - "arguments": { - "properties": {} - }, "auto-delete": { "type": "boolean" }, @@ -82,9 +79,6 @@ "ignore_above": 1024, "type": "keyword" }, - "headers": { - "properties": {} - }, "if-empty": { "type": "boolean" }, @@ -501,9 +495,6 @@ } } }, - "supported": { - "properties": {} - }, "warnings": { "ignore_above": 1024, "type": "keyword" @@ -758,9 +749,6 @@ "domloadtime": { "type": "long" }, - "fields": { - "properties": {} - }, "final": { "ignore_above": 1024, "type": "keyword" @@ -777,9 +765,6 @@ "norms": false, "type": "text" }, - "headers": { - "properties": {} - }, "params": { "ignore_above": 1024, "type": "keyword" @@ -796,9 +781,6 @@ "ignore_above": 1024, "type": "keyword" }, - "headers": { - "properties": {} - }, "phrase": { "ignore_above": 1024, "type": "keyword" @@ -897,9 +879,6 @@ "initial": { "type": "long" }, - "keys": { - "properties": {} - }, "line": { "ignore_above": 1024, "type": "keyword" @@ -934,9 +913,6 @@ "ignore_above": 1024, "type": "keyword" }, - "values": { - "properties": {} - }, "vbucket": { "type": "long" }, @@ -967,9 +943,6 @@ "flags": { "type": "long" }, - "keys": { - "properties": {} - }, "opaque": { "type": "long" }, @@ -980,9 +953,6 @@ "opcode_value": { "type": "long" }, - "stats": { - "properties": {} - }, "status": { "ignore_above": 1024, "type": "keyword" @@ -997,9 +967,6 @@ "value": { "type": "long" }, - "values": { - "properties": {} - }, "version": { "ignore_above": 1024, "type": "keyword" diff --git a/winlogbeat/winlogbeat.template-es2x.json b/winlogbeat/winlogbeat.template-es2x.json index c170b52cec7..8eadf0733bc 100644 --- a/winlogbeat/winlogbeat.template-es2x.json +++ b/winlogbeat/winlogbeat.template-es2x.json @@ -55,15 +55,9 @@ "index": "not_analyzed", "type": "string" }, - "event_data": { - "properties": {} - }, "event_id": { "type": "long" }, - "fields": { - "properties": {} - }, "keywords": { "ignore_above": 1024, "index": "not_analyzed", @@ -199,9 +193,6 @@ } } }, - "user_data": { - "properties": {} - }, "version": { "type": "long" }, diff --git a/winlogbeat/winlogbeat.template-es6x.json b/winlogbeat/winlogbeat.template-es6x.json index 87dce58a8a5..5f1aa2f16f4 100644 --- a/winlogbeat/winlogbeat.template-es6x.json +++ b/winlogbeat/winlogbeat.template-es6x.json @@ -44,15 +44,9 @@ "ignore_above": 1024, "type": "keyword" }, - "event_data": { - "properties": {} - }, "event_id": { "type": "long" }, - "fields": { - "properties": {} - }, "keywords": { "ignore_above": 1024, "type": "keyword" @@ -163,9 +157,6 @@ } } }, - "user_data": { - "properties": {} - }, "version": { "type": "long" }, diff --git a/winlogbeat/winlogbeat.template.json b/winlogbeat/winlogbeat.template.json index c1cc8c8f6e0..0bbe71d32f5 100644 --- a/winlogbeat/winlogbeat.template.json +++ b/winlogbeat/winlogbeat.template.json @@ -47,15 +47,9 @@ "ignore_above": 1024, "type": "keyword" }, - "event_data": { - "properties": {} - }, "event_id": { "type": "long" }, - "fields": { - "properties": {} - }, "keywords": { "ignore_above": 1024, "type": "keyword" @@ -166,9 +160,6 @@ } } }, - "user_data": { - "properties": {} - }, "version": { "type": "long" },