If the connector name cannot be unquoted, use the raw value (#3371)

This commit is contained in:
Daniel Nelson
2017-10-24 15:36:23 -07:00
committed by GitHub
parent 65580759fc
commit 6d1777276c
2 changed files with 63 additions and 5 deletions

View File

@@ -165,7 +165,7 @@ func (s *Tomcat) Gather(acc telegraf.Accumulator) error {
for _, c := range status.TomcatConnectors {
name, err := strconv.Unquote(c.Name)
if err != nil {
return fmt.Errorf("Unable to unquote name '%s': %s", c.Name, err)
name = c.Name
}
tccTags := map[string]string{