We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 784ac6c commit bf16c76Copy full SHA for bf16c76
plugins/outputs/datadog/datadog.go
@@ -43,6 +43,7 @@ type Metric struct {
43
Points [1]Point `json:"points"`
44
Host string `json:"host"`
45
Tags []string `json:"tags,omitempty"`
46
+ Type string `json:"type"`
47
}
48
49
type Point [2]float64
@@ -91,6 +92,13 @@ func (d *Datadog) Write(metrics []telegraf.Metric) error {
91
92
Tags: metricTags,
93
Host: host,
94
95
+ switch m.Type() {
96
+ case telegraf.Counter, telegraf.Histogram:
97
+ metric.Type = "count"
98
+ case telegraf.Gauge:
99
+ metric.Type = "gauge"
100
+ }
101
+
102
metric.Points[0] = dogM
103
tempSeries = append(tempSeries, metric)
104
metricCounter++
0 commit comments