I. Renderings
< /div>
Second. Indicators
Three. Implementation
Four. Add to Zabbix
< /p>
V. Precautions
[[emailprotected]10- 10-1-2 bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /data/zookeeper-3.4.13/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[[emailprotected]< span style="color: #800080;">172-30-36 span>-157 bin]# echo mntr|nc 10.10.1.2 2181
This ZooKeeper instance is not currently serving requests
span>
Six. Summary
I have been monitoring, these middleware Zookeeper, Kafka…, I usually only know a little bit about it, so I built and deployed it. I haven’t really used it, and it’s usually used by big data students. As an operation and maintenance personnel, I need to monitor him. Because I don’t know the basics for him, what indicators to monitor is really a big shot. After continuous collection on the Internet to see how others did it, the following basic monitoring was done.
The most important thing to monitor is data. Everything is data. You can monitor whatever you want with data. So what data is important? How to obtain this data? Monitoring indicators are especially important.
Monitoring indicators of Zookeeper (collected on the Internet, and add them when you encounter special ones in actual situations)
< img alt="Share pictures" src="/wp-content/uploads/images/opensource/zookeeper/1626812899403.png">
I realize these monitoring indicators It is implemented through Zabbix’s custom script, the script address: https://github.com/Lemon-le/Zookeeper-Monitor-Zabbix
The fourth version of Zookeeper is used. Use the word command to obtain the relevant indicators. Put the zookeeper_mntr.sh and zookeeper_ruok.sh scripts on the machine with the Zookeeper service respectively. My path is: /etc/zabbix/zabbix_agentd.d/shell-script directory, put zookeeper .conf is placed in the /etc/zabbix/zabbix_agentd.d/ directory, and then restart zabbix-agent on the Zookeeper server
t.
Import the template on Zabbix, import the Zookeeper_template.xml file above, and then connect the template to the Zookeeper server
You can see the monitoring items are:
Trigger:
When doing Zookeeper monitoring, the following problems were found. Use ps to check if the zookeeper process exists Yes, the port also exists, but its status is wrong, and the use of four-character commands is also wrong
[[emailprotected]10-10-1-< span style="color: #800080;">2 bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /data/zookeeper-3.4.13/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[[emailprotected]10-10-1-2 bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /data/zookeeper-3.4.13/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
The above error is verified by Zookeeper’s 2888 and 3888 port security The group is not opened, but I don’t know why only one reported an error, and two elected leaders and followers
[[emailprotected]172-30-36-< span style="color: #800080;">157 bin]# echo mntr|nc 10.10.1.2 2181
This ZooKeeper instance is not currently serving requests
[[emailprotected]172-30-36-157 bin]# echo mntr|nc 10.10 .1.2 2181
This ZooKeeper instance is not currently serving requests
Note: When monitoring Zookeeper, you can’t just use the monitoring port to keep it out of existence, you have to monitor the status to truly know whether it’s normal
p>
The saying that quantitative changes produce qualitative changes is justified. Knowledge is also a big problem. We have been collecting and collecting monitoring indicators, but I just don’t know which ones are important. No matter how much you look at, no matter how much you check, you still have to do it.
The above monitoring is only a very basic part. Record it. One is a summary of your own mental journey, but a small thing has been completed, and it has been completed with results. There will be a little sense of accomplishment and will increase your confidence.
WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4799 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC