Use 'localhost' as default 'server' tag in zookeeper input (#4387)

This commit is contained in:
Greg
2018-07-05 15:37:13 -06:00
committed by Daniel Nelson
parent f5f9fa2095
commit a82b4fbd96
3 changed files with 33 additions and 1 deletions

View File

@@ -158,8 +158,14 @@ func (z *Zookeeper) gatherServer(ctx context.Context, address string, acc telegr
}
}
}
srv := "localhost"
if service[0] != "" {
srv = service[0]
}
tags := map[string]string{
"server": service[0],
"server": srv,
"port": service[1],
"state": zookeeper_state,
}