Skip to content

input_zookeeper sends empty server tag #4381

@dimas

Description

@dimas

Relevant telegraf.conf:

[[inputs.zookeeper]]
  servers = [":2181"]

System info:

Linux ip-10-0-158-207 3.13.0-149-generic #199-Ubuntu SMP Thu May 17 10:12:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
ii  telegraf                                  1.6.2-1                                    amd64        Plugin-driven server agent for reporting metrics into InfluxDB.

Expected behavior:

The https://github.com/influxdata/telegraf/tree/master/plugins/inputs/zookeeper page says

  ## If no servers are specified, then localhost is used as the host.
  ## If no port is specified, 2181 is used

Actual behavior:

Metrics do get collected as expected however server tag is reported as an empty string which causes problem down the line for us. At the same time, if we set servers as "localhost:2181" instead of just ":2181" the same metrics are collected and server="localhost" tag is reported.

While problems caused by an empty tag are specific to our metric ingestion chain, it is a bit misleading that docs say no server is the same as localhost but in reality there is a difference.

To be honest I am not sure myself if this issue really worth fixing, just reporting you a discrepancy we came across.

Metadata

Metadata

Assignees

Labels

bugunexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions