JMX exporter is not exporting metrics to prometheus from Standalone Zookeeper instance

1,196 views
Skip to first unread message

pravee...@gmail.com

unread,
Aug 9, 2018, 6:40:30 AM8/9/18
to Prometheus Users
Hello All,

I have standalone kafka and Zookeeper instance 

JXM-exporter is able to exporter JVM metrics to Prometheus but not Zookeeper related metrics 
Able to see only the following metrics

Getting the following from ZK instance
---------------------------------------------------------------------------
sh-4.2$ curl http://localhost:5555/metrics |grep -v ^#
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10402  100 10402    0     0   767k      0 --:--:-jvm_classes_loaded 2696.0
- jvm_classes_loaded_total 2696.0
-jvm_classes_unloaded_total 0.0
-:jvm_memory_bytes_used{area="heap",} 2.5018392E7
-jvm_memory_bytes_used{area="nonheap",} 2.831128E7
-:jvm_memory_bytes_committed{area="heap",} 1.13770496E8
-jvm_memory_bytes_committed{area="nonheap",} 2.9622272E7
-jvm_memory_bytes_max{area="heap",} 2.39075328E8
 jvm_memory_bytes_max{area="nonheap",} -1.0
--:jvm_memory_pool_bytes_used{pool="Code Cache",} 9800960.0
-jvm_memory_pool_bytes_used{pool="Metaspace",} 1.677932E7
---------------------------------------------------------------------------

not able to see the following Zk related metrics 
---------------------------------------------------------------------------
zookeeper_MaxClientCnxnsPerHost{replicaId="2",} 60.0
zookeeper_MaxClientCnxnsPerHost{memberType="Leader",replicaId="2",} 60.0
zookeeper_MaxSessionTimeout{replicaId="2",} 40000.0
zookeeper_MaxSessionTimeout{memberType="Leader",replicaId="2",} 40000.0
zookeeper_ElectionTimeTaken{memberType="Leader",replicaId="2",} 263.0
zookeeper_MaxRequestLatency{memberType="Leader",replicaId="2",} 12.0
zookeeper_ElectionType{replicaId="2",} 3.0
zookeeper_SyncLimit{replicaId="2",} 2.0
zookeeper_Tick{replicaId="2",} 2522.0
---------------------------------------------------------------------------

But If I have two ZK instances one as leader and the other one as follower, I'm able to see the metric

Please let me know if there any configuration/settings for Standalone ZK instance to get ZK metrics in Prometheus. 



Cody Boggs

unread,
Aug 14, 2018, 10:13:41 AM8/14/18
to pravee...@gmail.com, Prometheus Users
What does your JMX Exporter configuration look like? It seems that you might have some relabeling / mapping rules in the exporter config that are omitting certain mbean name patterns.

Cody Boggs | Yak Shaver (Ops)

FreshTracks.io

Intelligent Alerting for Kubernetes and Prometheus


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/285d7378-6112-41d1-8de3-120901c8ce6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Brazil

unread,
Aug 14, 2018, 10:37:48 AM8/14/18
to Cody Boggs, pravee...@gmail.com, Prometheus Users
On 14 August 2018 at 15:13, Cody Boggs <co...@freshtracks.io> wrote:
What does your JMX Exporter configuration look like? It seems that you might have some relabeling / mapping rules in the exporter config that are omitting certain mbean name patterns.

The example config was recently updated, so you might want to check the current version of https://github.com/prometheus/jmx_exporter/blob/master/example_configs/zookeeper.yaml

Brian
 

For more options, visit https://groups.google.com/d/optout.



--

Praveen Metri

unread,
Aug 15, 2018, 12:52:36 PM8/15/18
to brian....@robustperception.io, co...@freshtracks.io, promethe...@googlegroups.com
Thanks, I'll check it out. 

To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages