Skip to content

Commit

Permalink
Insert . between msrmnt and field name in datadog output
Browse files Browse the repository at this point in the history
fixes #600
  • Loading branch information
sparrc committed Jan 28, 2016
1 parent 1f1384a commit d835c19
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
- [#603](https://github.com/influxdata/telegraf/pull/603): Aggregate statsd timing measurements into fields. Thanks @marcinbunsch!

### Bugfixes
- [#595](https://github.com/influxdata/telegraf/issues/595): graphite output should include tags to separate duplicate measurements.
- [#599](https://github.com/influxdata/telegraf/issues/599): datadog plugin tags not working.
- [#600](https://github.com/influxdata/telegraf/issues/600): datadog measurement/field name parsing is wrong.

## v0.10.1 [2016-01-27]

Expand Down
10 changes: 9 additions & 1 deletion plugins/outputs/datadog/datadog.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,16 @@ func (d *Datadog) Write(metrics []telegraf.Metric) error {
mname := strings.Replace(m.Name(), "_", ".", -1)
if dogMs, err := buildMetrics(m); err == nil {
for fieldName, dogM := range dogMs {
// name of the datadog measurement
var dname string
if fieldName == "value" {
// adding .value seems redundant here
dname = mname
} else {
dname = mname + "." + strings.Replace(fieldName, "_", ".", -1)
}
metric := &Metric{
Metric: mname + strings.Replace(fieldName, "_", ".", -1),
Metric: dname,
Tags: buildTags(m.Tags()),
Host: m.Tags()["host"],
}
Expand Down

0 comments on commit d835c19

Please sign in to comment.