Hello, everyone.
I added 2 custom fields in "metricbeat.yml" like following:
fields: {xaxis: 1, yaxis: 1}
After data store in ES, those 2 fields are defined as "String" type in the mapping definition:
{
"fields": {
"path_match": "fields.*",
"match_mapping_type": "string",
"mapping": {
"type": "keyword"
}
}
}
So, may I know if there is a configuration item to let me modify the type from "String" to "Long" for custom fields?
Thanks in advance!
ruflin
(ruflin)
February 14, 2019, 4:00pm
2
There is a "hidden" setting callend append_fields
that you can use for that: https://github.com/elastic/beats/blob/master/libbeat/_meta/config.reference.yml#L863
It has the same structure as the fields.yml we use inside our repository.
For your case it would be:
- name: fields.xaxis
type: log
If you change anything here, you must overwrite your existing template and it will only apply to new indices.
system
(system)
Closed
March 14, 2019, 4:00pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.