OpenTSDB filter types for HTTP AND telnet
This commit is contained in:
parent
eb67b17c28
commit
9b0e1e9c49
|
@ -157,6 +157,15 @@ func (o *OpenTSDB) WriteTelnet(metrics []telegraf.Metric, u *url.URL) error {
|
||||||
tags := ToLineFormat(cleanTags(m.Tags()))
|
tags := ToLineFormat(cleanTags(m.Tags()))
|
||||||
|
|
||||||
for fieldName, value := range m.Fields() {
|
for fieldName, value := range m.Fields() {
|
||||||
|
switch value.(type) {
|
||||||
|
case int64:
|
||||||
|
case uint64:
|
||||||
|
case float64:
|
||||||
|
default:
|
||||||
|
log.Printf("D! OpenTSDB does not support metric value: [%s] of type [%T].\n", value, value)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
metricValue, buildError := buildValue(value)
|
metricValue, buildError := buildValue(value)
|
||||||
if buildError != nil {
|
if buildError != nil {
|
||||||
log.Printf("E! OpenTSDB: %s\n", buildError.Error())
|
log.Printf("E! OpenTSDB: %s\n", buildError.Error())
|
||||||
|
|
Loading…
Reference in New Issue