In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces you about Zabbix 2.4.5 comes with MySQL monitoring configuration related content, share it for your reference learning, let's take a look at the detailed introduction:
I. Relevant description
Use zabbix 2.4.5 to monitor all business and system networks on the production line. Of course, you also need to monitor mysql database related information. The mysql monitoring template that comes with zabbix can monitor mysql. This article is passed under zabbix 2.4.5. Please experiment with other versions.
Second, configure mysql to monitor
1. Authorize zabbixagent to connect to database first:
Log in to mysql as mysql roott
$mysql -uroot -p123456 -e"GRANT USAGE ON *.* TO 'zabbixagent'@'localhost' IDENTIFIED BY 'zbbixagent'"; $GRANT USAGE,PROCESS,SUPER,REPLICATION CLIENT,REPLICATION SLAVE ON *.* TO 'zabbixagent'@'localhost' IDENTIFIED BY 'zabbixagent'; $flush privileges;
Or:
#mysql -uroot -p -e"GRANT USAGE ON *.* TO 'zabbixagent'@'localhost' IDENTIFIED BY 'zabbixagent'"
2. Add mysql configuration file
vim /etc/zabbix/.my.cnf#Zabbix Agent [mysql] host=localhost user=zabbixagent password=zabbixagent socket=/data1/mysqldb/mysql/mysql.sock [mysqladmin] host=localhost user=zabbixagent password=zabbixagent socket=/data1/mysqldb/mysql/mysql.sock
Note: The socket is specifically placed there. Please check the path in cat /etc/my.cnf before modifying it.
The requested URL/etc/zabbix/zabbix_agent/was not found on this server.
Amend as follows:
UnsafeUserParameters=1Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/
4. Modify mysql template parameters
Zabbix -2.4.4 comes with mysql template, which is placed in/etc/zabbix/zabbix_agent.d/userparameter_mysql.conf by default
You need to replace HOME=/var/lib/zabbix with HOME=/etc/zabbix
.,$ s/\/var\/lib/\/etc/g (vim command-line mode all replaced)
Restart zabbix_agent
#service zabbix_agent restart
The requested URL/var/log/zabbix/zabbix_server.log was Not found on this server.
27659:20150428:111248.007 error reason for "ydnwy-01:mysql.status[Uptime]" changed: Received value [ERROR 2002 (HY000):Can't connect to local MySQL server through socket '/data1/mysqldb/mysql/mysql.sock' (13)] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
A similar error occurs indicating that there is a problem accessing mysql.sock on the monitoring end. Please check the permissions or
#ln -s /data1/mysqldb/mysql/mysql.sock /var/lib/mysql/mysql.sock
summary
The above is the whole content of this article, I hope the content of this article can bring some help to everyone's study or work, if you have questions, you can leave a message to exchange, thank you for your support.
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.