Skip to content

Commit

Permalink
Fix breaking change in monitoring data
Browse files Browse the repository at this point in the history
The prefix for the stats metrics was metrics but renamed to `stats` by accident as the name is now auto generated. This reverts this change.

Closes elastic#7562
  • Loading branch information
ruflin committed Jul 11, 2018
1 parent c0492f8 commit d84018a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions libbeat/monitoring/report/elasticsearch/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,15 @@ func (r *reporter) snapshotLoop(namespace string, period time.Duration) {
continue
}

// Prefix for the inside the event. For backward compatibility stats is renamed to metrics.
prefix := namespace
if namespace == "stats" {
prefix = "metrics"
}

fields := common.MapStr{
"beat": r.beatMeta,
namespace: snapshot,
"beat": r.beatMeta,
prefix: snapshot,
}
if len(r.tags) > 0 {
fields["tags"] = r.tags
Expand Down

0 comments on commit d84018a

Please sign in to comment.