hi all ,
I try activate modules zookeeper .
here zookeeper.yml
:~$ cat /etc/metricbeat/modules.d/zookeeper.yml
- module: zookeeper
enabled: true
metricsets: ["mntr"]
period: 10s
hosts: ["localhost:2181"]
~$
and here console mntr :
:~$ echo mntr | nc localhost 2181
zk_version 3.4.8-1--1, built on Fri, 26 Feb 2016 14:51:43 +0100
zk_avg_latency 0
zk_max_latency 3101
zk_min_latency 0
zk_packets_received 614297397
zk_packets_sent 614340973
zk_num_alive_connections 102
zk_outstanding_requests 0
zk_server_state standalone
zk_znode_count 44
zk_watch_count 25
zk_ephemerals_count 36
zk_approximate_data_size 4303
zk_open_file_descriptor_count 146
zk_max_file_descriptor_count 4096
:~$
and here debug metribeat
|2018-11-26T03:26:08.665Z|INFO|[monitoring]|log/log.go:144|Non-zero metrics in the last 30s|{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":1520,"time":{"ms":64}},"total":{"ticks":3720,"time":{"ms":132},"value":3720},"user":{"ticks":2200,"time":{"ms":68}}},"handles":{"limit":{"hard":1048576,"soft":1024},"open":8},"info":{"ephemeral_id":"ebe0e5fe-f912-42cd-a033-8fc816f7066a","uptime":{"ms":840032}},"memstats":{"gc_next":7927040,"memory_alloc":4308304,"memory_total":747519176,"rss":20480}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":44,"batches":3,"total":44},"read":{"bytes":1328},"write":{"bytes":60689}},"pipeline":{"clients":10,"events":{"active":0,"published":44,"total":44},"queue":{"acked":44}}},"metricbeat":{"redis":{"info":{"events":3,"success":3},"keyspace":{"events":3,"success":3}},"system":{"cpu":{"events":3,"success":3},"load":{"events":3,"success":3},"memory":{"events":3,"success":3},"network":{"events":6,"success":6},"process":{"events":17,"success":17},"process_summary":{"events":3,"success":3}},"zookeeper":{"mntr":{"events":3,"success":3}}},"system":{"load":{"1":0.01,"15":0,"5":0.02,"norm":{"1":0.01,"15":0,"5":0.02}}}}}}|
|---|---|---|---|---|---|
|2018-11-26T03:26:38.665Z|INFO|[monitoring]|log/log.go:144|Non-zero metrics in the last 30s|{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":1570,"time":{"ms":48}},"total":{"ticks":3850,"time":{"ms":132},"value":3850},"user":{"ticks":2280,"time":{"ms":84}}},"handles":{"limit":{"hard":1048576,"soft":1024},"open":9},"info":{"ephemeral_id":"ebe0e5fe-f912-42cd-a033-8fc816f7066a","uptime":{"ms":870033}},"memstats":{"gc_next":7838368,"memory_alloc":5676544,"memory_total":773900760,"rss":20480}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":48,"batches":3,"total":48},"read":{"bytes":1336},"write":{"bytes":62850}},"pipeline":{"clients":10,"events":{"active":0,"published":48,"total":48},"queue":{"acked":48}}},"metricbeat":{"redis":{"info":{"events":3,"success":3},"keyspace":{"events":3,"success":3}},"system":{"cpu":{"events":3,"success":3},"filesystem":{"events":2,"success":2},"fsstat":{"events":1,"success":1},"load":{"events":3,"success":3},"memory":{"events":3,"success":3},"network":{"events":6,"success":6},"process":{"events":18,"success":18},"process_summary":{"events":3,"success":3}},"zookeeper":{"mntr":{"events":3,"success":3}}},"system":{"load":{"1":0.01,"15":0,"5":0.02,"norm":{"1":0.01,"15":0,"5":0.02}}}}}}|
|2018-11-26T03:27:08.665Z|INFO|[monitoring]|log/log.go:144|Non-zero metrics in the last 30s|{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":1620,"time":{"ms":52}},"total":{"ticks":3980,"time":{"ms":132},"value":3980},"user":{"ticks":2360,"time":{"ms":80}}},"handles":{"limit":{"hard":1048576,"soft":1024},"open":9},"info":{"ephemeral_id":"ebe0e5fe-f912-42cd-a033-8fc816f7066a","uptime":{"ms":900032}},"memstats":{"gc_next":6915824,"memory_alloc":3704544,"memory_total":800172024,"rss":16384}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":44,"batches":3,"total":44},"read":{"bytes":1317},"write":{"bytes":62210}},"pipeline":{"clients":10,"events":{"active":0,"published":44,"total":44},"queue":{"acked":44}}},"metricbeat":{"redis":{"info":{"events":3,"success":3},"keyspace":{"events":3,"success":3}},"system":{"cpu":{"events":3,"success":3},"load":{"events":3,"success":3},"memory":{"events":3,"success":3},"network":{"events":6,"success":6},"process":{"events":17,"success":17},"process_summary":{"events":3,"success":3}},"zookeeper":{"mntr":{"events":3,"success":3}}},"system":{"load":{"1":0.34,"15":0.03,"5":0.09,"norm":{"1":0.34,"15":0.03,"5":0.09}}}}}}|
Here Log at zookeeper.log
2018-11-26 03:24:38,754 - INFO [Thread-312158:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:46616 (no session established for client)
2018-11-26 03:24:48,726 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:46622
2018-11-26 03:24:48,754 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing mntr command from /127.0.0.1:46622
2018-11-26 03:24:48,754 - INFO [Thread-312159:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:46622 (no session established for client)
2018-11-26 03:24:58,726 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:46628
2018-11-26 03:24:58,749 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing mntr command from /127.0.0.1:46628
2018-11-26 03:24:58,749 - INFO [Thread-312160:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:46628 (no session established for client)
2018-11-26 03:25:08,725 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:46634
2018-11-26 03:25:08,755 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing mntr command from /127.0.0.1:46634
2018-11-26 03:25:08,755 - INFO [Thread-312161:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:46634 (no session established for client)
2018-11-26 03:25:18,722 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:46640
2018-11-26 03:25:18,755 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing mntr command from /127.0.0.1:46640
2018-11-26 03:25:18,756 - INFO [Thread-312162:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:46640 (no session established for client)