I’m trying to fetch Zookeeper metrics, but I’m getting the error message ‘Cannot fetch metrics in time.’ However, I can ping Zookeeper and access it via curl. How can I resolve this issue?
Hello ejhon_s,
The Lenses only connects to the MSK Zookeeper and does not fetch its metrics; this is also not something that will interfere with Lenses’ operation. The ‘Cannot fetch metrics in time’ issue can be resolved by creating the Zookeeper connection via Lenses-CLI and changing the ‘zookeeperSessionTimeout’ parameter. The command to configure Zookeeper is:
lenses-cli connections update --name zookeeper --connection-config '[{"key":"zookeeperUrls","value":["dd-us-center.aws-us.domain.com:2181"]},{"key":"metricsType","value":"JMX"},{"key":"metricsPort","value":9585},{"key":"zookeeperConnectionTimeout","value":70000}, {"key":"zookeeperSessionTimeout","value":70000}]'
Ensure that Lenses-CLI is in the same version as Lenses. Change the values of “zookeeperUrls” to your Zookeeper; you can use the “–debug” parameter if an error occurs and you want to know what it is.