In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. principle
Zabbix monitors mongodb via echo "db.serverStatus()"| mongo admin to view mongodb status
II. server configuration
1) Add global variables of mongo
# vim /etc/profile.d/mongo.sh
export PATH=/usr/local/mongodb/bin:$PATH
# . /etc/profile.d/mongo.sh
2) After execution, you can see some status information of mongodb
# echo "db.serverStatus().opcounters" | mongo admin
MongoDB shell version: 3.2.7
connecting to: admin
{
"insert" : 0,
"query" : 0,
"update" : 0,
"delete" : 0,
"getmore" : 0,
"command" : 594338669
}
Bye
3) Add the following to the zabbix client configuration file:
# vim zabbix_agentd.conf
UserParameter=MongoDB.Status[*],/bin/echo "db.serverStatus().$ 1" | /usr/local/mongodb/bin/mongo admin | grep "\"| awk -F : '{print $$2}'|awk -F , '{print $$1}'
4) Restart the agent service and create monitoring items on the web.
# /etc/init.d/zabbix-agent restart
III. Web-side configuration
1) Import Mongodb template (template download:
)
2) Add to host and link template
3) Modify the detailed information in the template monitoring item, change the previous 28018 to the current mongodb port ~ otherwise, the alarm will always be given. Because the default port monitored in the template is 28018.
4) In the template, select Template MongoDB template, and then batch update, change to zabbix client monitoring ~
5) After the modification is successful, you can view the status as 1 in the latest data, that is, in operation ~
6) Completion
View Monitoring:
This article comes from: penguin's Blog, permanent link: www.mrliangqi.com/1382.html
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.