Skip to content

Commit

Permalink
metricbeat: fix bug that zookeeper do not fetch file descriptor info …
Browse files Browse the repository at this point in the history
…correctly

Use `zk_open_file_descriptor_count` instead of `open_file_descriptor_count` to check whether the zookeeper is running on Unix platforms.

Because the output variable is `zk_open_file_descriptor_count` depending on the doc [ZooKeeper Administrator's Guide](http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_zkCommands)
  • Loading branch information
wangdisdu committed Dec 19, 2017
1 parent 84e021d commit f5bd084
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di
- Fix `ProcState` on Linux and FreeBSD when process names contain parentheses. {pull}5775[5775]
- Fix incorrect `Mem.Used` calculation under linux. {pull}5775[5775]
- Fix mongodb session consistency mode to allow command execution on secondary nodes. {issue}4689[4689]
- Fix `open_file_descriptor_count` and `max_file_descriptor_count` lost in zookeeper module {pull}5902[5902]

*Packetbeat*

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/zookeeper/mntr/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func eventMapping(response io.Reader) common.MapStr {
}

// only available on Unix platforms
if _, ok := fullEvent["open_file_descriptor_count"]; ok {
if _, ok := fullEvent["zk_open_file_descriptor_count"]; ok {
schemaUnix.ApplyTo(event, fullEvent)
}

Expand Down

0 comments on commit f5bd084

Please sign in to comment.