Skip to content

Commit

Permalink
Increase the fields limit (#3275)
Browse files Browse the repository at this point in the history
Elasticsearch has a default limit of 1000 fields starting with 5.x.
Metricbeat already defines a bit over that in it's current mapping. In most
deployments, these fields won't be actually used all at the same time, so
the effects of increasing the limit shouldn't be that large (can still affect
the cluster state processing).

Longer term we'll need a better solution for this.
  • Loading branch information
tsg authored and monicasarbu committed Jan 3, 2017
1 parent 8b7d5fb commit 1f2be4b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ https://github.com/elastic/beats/compare/v5.1.1...master[Check the HEAD diff]
- Add support for passing list and dictionary settings via -E flag.
- Support for parsing list and dictionary setting from environment variables.
- Added new flags to import_dashboards (-cacert, -cert, -key, -insecure). {pull}3139[3139] {pull}3163[3163]
- The limit for the number of fields is increased via the mapping template. {pull}3275[3275]

*Metricbeat*
- Kafka module broker matching enhancements. {pull}3129[3129]
Expand Down
1 change: 1 addition & 0 deletions filebeat/filebeat.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@
},
"order": 0,
"settings": {
"index.mapping.total_fields.limit": 10000,
"index.refresh_interval": "5s"
},
"template": "filebeat-*"
Expand Down
1 change: 1 addition & 0 deletions heartbeat/heartbeat.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
},
"order": 0,
"settings": {
"index.mapping.total_fields.limit": 10000,
"index.refresh_interval": "5s"
},
"template": "heartbeat-*"
Expand Down
7 changes: 6 additions & 1 deletion libbeat/scripts/generate_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def fields_to_es_template(args, input, output, index, version):
"template": index,
"order": 0,
"settings": {
"index.refresh_interval": "5s"
"index.refresh_interval": "5s",
},
"mappings": {
"_default_": {
Expand All @@ -66,6 +66,11 @@ def fields_to_es_template(args, input, output, index, version):
template["mappings"]["_default_"]["_all"]["norms"] = {
"enabled": False
}
else:
# For ES 5.x, increase the limit on the max number of fields.
# In a typical scenario, most fields are not used, so increasing the
# limit shouldn't be that bad.
template["settings"]["index.mapping.total_fields.limit"] = 10000

properties = {}
dynamic_templates = []
Expand Down
1 change: 1 addition & 0 deletions metricbeat/metricbeat.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -3696,6 +3696,7 @@
},
"order": 0,
"settings": {
"index.mapping.total_fields.limit": 10000,
"index.refresh_interval": "5s"
},
"template": "metricbeat-*"
Expand Down
1 change: 1 addition & 0 deletions packetbeat/packetbeat.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,7 @@
},
"order": 0,
"settings": {
"index.mapping.total_fields.limit": 10000,
"index.refresh_interval": "5s"
},
"template": "packetbeat-*"
Expand Down
1 change: 1 addition & 0 deletions winlogbeat/winlogbeat.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
},
"order": 0,
"settings": {
"index.mapping.total_fields.limit": 10000,
"index.refresh_interval": "5s"
},
"template": "winlogbeat-*"
Expand Down

0 comments on commit 1f2be4b

Please sign in to comment.