From deed9b7009b48b5b40862fc5a24daee143a42ed6 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Wed, 20 Nov 2019 09:07:01 -0800 Subject: [PATCH] [7.5] Fix license ID field name (#14592) (#14635) * Fix license ID field name (#14592) * Fix license ID field name * Adding CHANGELOG entry * Fixing up CHANGELOG --- CHANGELOG.next.asciidoc | 1 + metricbeat/module/elasticsearch/elasticsearch.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 7ca7be36f02a..7731450332db 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -67,6 +67,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fix cloudwatch metricset with names and dimensions in config. {issue}14376[14376] {pull}14391[14391] - Fix marshaling of ms-since-epoch values in `elasticsearch/cluster_stats` metricset. {pull}14378[14378] - Log bulk failures from bulk API requests to monitoring cluster. {issue}14303[14303] {pull}14356[14356] +- Fixed bug with `elasticsearch/cluster_stats` metricset not recording license ID in the correct field. {pull}14592[14592] *Packetbeat* diff --git a/metricbeat/module/elasticsearch/elasticsearch.go b/metricbeat/module/elasticsearch/elasticsearch.go index 30ee0ce0a9e2..f44de547e92e 100644 --- a/metricbeat/module/elasticsearch/elasticsearch.go +++ b/metricbeat/module/elasticsearch/elasticsearch.go @@ -485,10 +485,9 @@ func (l *License) IsOneOf(candidateLicenses ...string) bool { // particular it ensures that ms-since-epoch values are marshaled as longs // and not floats in scientific notation as Elasticsearch does not like that. func (l *License) ToMapStr() common.MapStr { - m := common.MapStr{ "status": l.Status, - "id": l.ID, + "uid": l.ID, "type": l.Type, "issue_date": l.IssueDate, "issue_date_in_millis": l.IssueDateInMillis,