Metricbeat with Zookeper module

I try use Metricbeat 7.15.0 with Zookeeper module and receive this messages in Elasticsearch:

error.message: error obtaining serverid: no 'serverId' found in 'conf' response

zookeeper.yml:

- module: zookeeper
  enabled: true
  metricsets: [mntr, server, connection]
  period: 30s
  hosts: ["100.120.50.10:2181"]

I don't receive any other metrics like:

  • zookeeper.server.connections
  • zookeeper.mntr.znode_count
  • zookeeper.connection.interest_ops

Any comments please?

Hello,

we had the same issue and fixed it.

Details see: Improve handing of disabled commands in Zookeeper Metricbeat module · Issue #20376 · elastic/beats · GitHub

cons and conf need to be whitelisted in zookeeper, this is new in metricbeat

see: Add server id to zookeeper events (#25550) · elastic/beats@90373d5 · GitHub

adapt your zookeeper config file
e.g: "4lw.commands.whitelist=ruok,conf,cons"

Then all works.
Happy hacking.