Skip to content

Commit

Permalink
feat: remove bigbluebutton prefix for metadata gathering #29
Browse files Browse the repository at this point in the history
  • Loading branch information
SLedunois committed Oct 22, 2023
1 parent f47305e commit 43b01a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/bigbluebutton/bigbluebutton.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (b *BigBlueButton) Gather(acc telegraf.Accumulator) error {
for mval, rs := range mrecs {
tags := make(map[string]string)
tags[mname] = mval
acc.AddFields(fmt.Sprintf("bigbluebutton_%s", mname), toStringMapInterface(rs.ToMap()), tags)
acc.AddFields(mname, toStringMapInterface(rs.ToMap()), tags)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/bigbluebutton/bigbluebutton_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func TestBigBlueButtonGatherByMetadata(t *testing.T) {

expected := []telegraf.Metric{
testutil.MustMetric("bigbluebutton", map[string]string{}, toStringMapInterface(record), time.Unix(0, 0)),
testutil.MustMetric(fmt.Sprintf("bigbluebutton_%s", metadata), tags, toStringMapInterface(tenantRecord), time.Unix(0, 0)),
testutil.MustMetric(metadata, tags, toStringMapInterface(tenantRecord), time.Unix(0, 0)),
}

acc.Wait(len(expected))
Expand Down

0 comments on commit 43b01a0

Please sign in to comment.