Skip to content

Commit

Permalink
plugins/inputs/nats: Rename measurement to "nats"
Browse files Browse the repository at this point in the history
... instead of "nats_varz".
  • Loading branch information
mjs committed Jan 21, 2018
1 parent 9b1233a commit 096ea69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/nats/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (n *Nats) Gather(acc telegraf.Accumulator) error {
return err
}

acc.AddFields("nats_varz",
acc.AddFields("nats",
map[string]interface{}{
"in_msgs": stats.InMsgs,
"out_msgs": stats.OutMsgs,
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/nats/nats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ func TestMetricsCorrect(t *testing.T) {
"remotes": int(2),
}
tags := map[string]string{
"nats_server": srv.URL,
"server": srv.URL,
}
acc.AssertContainsTaggedFields(t, "nats_varz", fields, tags)
acc.AssertContainsTaggedFields(t, "nats", fields, tags)
}

func newTestNatsServer() *httptest.Server {
Expand Down

0 comments on commit 096ea69

Please sign in to comment.