Zabbix is a tool for network monitoring and system monitoring on Linux systems, but Zabbix cannot directly monitor the database. If you want to use Zabbix to monitor the database, you need to make the relevant settings. Here is a brief introduction for everyone: using Zabbix to monitor the database system.
Description:
If you want to use zabbix to monitor mysql, the default template will not work, because there is no key, so you must write your own script and define your own key. Scripts can be implemented in any language, but it is still convenient under Linux. Unlike php, which needs to install the php environment, python needs to install the python-MySQL library, and perl is the same.
Probably:
zabbix monitoring mysql probably has the following steps:
mysql add zabbix users, allow zabbix to view mysql status
zabbix agent add mysql_status script, Used to get the mysql status value;
zabbix agend adds the mysql_status.conf configuration file to define the key value. Restart the zabbix agentd after the configuration file ok;
Add the corresponding host mysql template on the zabbix server web interface (bring your own)
Specific:
1. mysql add zabbix users, After setting the usage permission, zabbix can only view mysql status, etc., cannot view other libraries
” grant usage on *.* to zabbix@‘zabbix agentd's intranet ip’ identified by ‘zabbix’;
》flush privileges
2. mysql_status script
# cat /usr/local/zabbix/bin/mysql_status
#! /bin/bash
#use zabbix to monitor mysql status
mysql=/usr/local/mysql/bin/mysql
var=$1
MYSQL_USER=$2
MYSQL_PASSWORD=$3
MYSQL_Host=$4
[ “${MYSQL_USER}” = ‘’ ] && MYSQL_USER=zabbix # Mysql zabbix user
[ “${MYSQL_PASSWORD}” = ‘’ ] && MYSQL_PASSWORD=zabbix #mysql zabbix password
[ “${MYSQL_Host} ” = ‘’ ] && MYSQL_Host=10.10.10.10 #zabbix agentd's intranet ip
[ “${var}” = ‘’ ] && echo “”
Protecting computer security is something everyone must master. Once the computer i
Each host on each network has an IP address. If the IP address conflicts, the netwo
Regardless of whether it is on Windows or Linux, I believe that many users or developers have encoun
Simple understanding of the Linux find command is not enough, we also need to know how to use it, th
How Linux uses ssh to transfer files to FTP space
How to configure LILO file for Red Flag Linux system
How to install and set up MQ in Linux
How to clean up Git and Repo invalid code in Linux system
How to restart Tomcat regularly on Linux system
Steps to install KVM virtual machine in CentOS5.5
How to solve the problem that the VPN client connection to the Linux server is slow to slow down
Using Linux routing and forwarding function to share the Internet
What should I do if the Linux system SSH timeout is disconnected?
Steps to back up Ubuntu system
Solve the problem of installing Linux prompt Boot Efi does not have space to set up
Ubuntu 14.04 prohibits the apport error report window startup method
Nginx server cache settings example explain
How long can Win8.1 not be activated?
Popular non-mainstream beauty map show to create mosaic blur flash map
Win7 Ultimate uses rookie upgrade to master must see
How to solve the problem that the C disk space is getting smaller and smaller
How to delete the boot boot menu in Win7 system?
How to open the Windows10 ISO CD image file?
How to get the Leprechaun Swordsman F Flame Stone Get the method of the Goblin Sword F Flame Stone