Log aerospike field value on error
This commit is contained in:
parent
cbd93f0598
commit
6f803308c5
|
@ -85,7 +85,7 @@ func (a *Aerospike) gatherServer(hostport string, acc telegraf.Accumulator) erro
|
||||||
if err == nil {
|
if err == nil {
|
||||||
fields[strings.Replace(k, "-", "_", -1)] = val
|
fields[strings.Replace(k, "-", "_", -1)] = val
|
||||||
} else {
|
} else {
|
||||||
log.Printf("I! skipping aerospike field %v with int64 overflow", k)
|
log.Printf("I! skipping aerospike field %v with int64 overflow: %q", k, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
acc.AddFields("aerospike_node", fields, tags, time.Now())
|
acc.AddFields("aerospike_node", fields, tags, time.Now())
|
||||||
|
@ -117,7 +117,7 @@ func (a *Aerospike) gatherServer(hostport string, acc telegraf.Accumulator) erro
|
||||||
if err == nil {
|
if err == nil {
|
||||||
nFields[strings.Replace(parts[0], "-", "_", -1)] = val
|
nFields[strings.Replace(parts[0], "-", "_", -1)] = val
|
||||||
} else {
|
} else {
|
||||||
log.Printf("I! skipping aerospike field %v with int64 overflow", parts[0])
|
log.Printf("I! skipping aerospike field %v with int64 overflow: %q", parts[0], parts[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
acc.AddFields("aerospike_namespace", nFields, nTags, time.Now())
|
acc.AddFields("aerospike_namespace", nFields, nTags, time.Now())
|
||||||
|
|
Loading…
Reference in New Issue