Skip to content

Zookeeper beats module is unable to parse some fields on ZK 3.6 and ZK 3.7 mntr responses #30066

@pfcoperez

Description

@pfcoperez

Problem coordinates:

  • Beats version: 7.17.1
  • ZooKeeper versions >3.6
  • Steps to Reproduce:
  1. Set up Zookeeper module, enable mntr metrics.
  2. Main the configuration point to a 3.7 ZooKeeper ensemble.
  3. All the mntr fields that used to be integers but are now float are not ingested anymore.

The problem is present in the parsing code for the mntr responses from ZooKeeper:

var (
// Matches first the variable name, second the param itself
paramMatcher = regexp.MustCompile("([^\\s]+)\\s+(.*$)")
schema = s.Schema{
"version": c.Str("zk_version"),
"latency": s.Object{
"avg": c.Int("zk_avg_latency"),
"min": c.Int("zk_min_latency"),
"max": c.Int("zk_max_latency"),
},
"packets": s.Object{
"received": c.Int("zk_packets_received"),
"sent": c.Int("zk_packets_sent"),
},
"num_alive_connections": c.Int("zk_num_alive_connections"),
"outstanding_requests": c.Int("zk_outstanding_requests"),
"server_state": c.Str("zk_server_state"),
"znode_count": c.Int("zk_znode_count"),
"watch_count": c.Int("zk_watch_count"),
"ephemerals_count": c.Int("zk_ephemerals_count"),
"approximate_data_size": c.Int("zk_approximate_data_size"),
}

I am working on a patch to make this module compatible with recent ZooKeeper versions.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions