Fix unmarshal of influxdb metrics will null tags

closes #1738
This commit is contained in:
Cameron Sparr
2016-09-09 14:44:17 +01:00
parent 532223a9cb
commit 16f617dbea
3 changed files with 104 additions and 1 deletions

View File

@@ -210,9 +210,13 @@ func (i *InfluxDB) gatherURL(
continue
}
if p.Tags == nil {
p.Tags = make(map[string]string)
}
// If the object was a point, but was not fully initialized,
// ignore it and move on.
if p.Name == "" || p.Tags == nil || p.Values == nil || len(p.Values) == 0 {
if p.Name == "" || p.Values == nil || len(p.Values) == 0 {
continue
}