Monitoring MySQL status with Zabbix
Introduction:
How to Use Zabbix to monitor MySQL status?
Zabbix has a template that monitors MySQL, but cannot be used directly. We need to write scripts based on the Key provided by the template to obtain data.
1. Check which keys are available.
> Configuration-> Templates
# On this
-entry as shown:After selecting change, add the graph you want to join, create it for the Add memory graphic (created in 3.1), select and double-click the Save button to save it.Double-click the Change button to add the 4 graph graph created in the previous section to screen in the name test.1.1 Creating a template 3.6.1 Creating a template Select Configureàtemplatesàcreate TemplateEnter the name and the group where you created the template, and then save it. At this point, you will find that th
Tags: water client awk 40 cal success Title init milZabbix with plugin Percona monitor MySQL dataIn the sense of Zabbix the MySQL plugin to monitor the MySQL database, but you will find that the MySQL monitoring items are very few, can not meet the needs of the company.Because its own template is too simple, so need to do more detailed monitoring, and Percona provides this detailed monitoring template and script, to solve the problem of incomplete mon
Awstats as a log analysis software, the function is good, but the interface is too simple, there is no chart function, here I took a flexible method, the Awstats analysis results (PV, hits (number of files), bandwidth, Visits (standalone IP)) is added to Zabbix and a trend chart is generated through Zabbix. In the first two articles, the use of our team awstats and its way of working are briefly described:
Environment requirements for Zabbix and zabbix
Environment requirements for Zabbix ConfigurationZabbix database selection, installation, creation, and upgradeHow to obtain ZABBIXFind the current version and its download instructions on the Zabbix homepage.Hardware and storage requirementsZABBIX has requirements on both
information to monitor mysql, I only keep this record. According to the official help documentation, Zabbix provides a template for mysql monitoring, you need to download and import the data by yourself, officially, or download the backup: template_MySql.
After downloading the file, Import it on the Zabbixweb Management page. Configure-Templates-Import Templates
/nginx_status.sh readingUserParameter=nginx.writing,/script/nginx_status.sh writingUserParameter=nginx.waiting,/script/nginx_status.sh waiting
# You can also directly add it to the end of/usr/local/zabbix/etc/zabbix_agentd.conf
Shell> vim/usr/local/zabbix/etc/zabbix_agentd.confInclude =/usr/local/zabbix/etc/zabbix_agentd.conf.d/*. confUnsafeUserParameters = 1 # A
#aunsafeuserparameters=1n"/etc/zabbix/zabbix_agentd.conf
Set the agent to boot
The code is as follows
Copy Code
[root@logsec/usr/local/src/zabbix-2.0.5]#chkconfig Zabbix_agentd on[root@logsec/usr/local/src/zabbix-2.0.5]#service Zabbix_agentd StartStarting ZABBIX_AGENTD: [OK]
Add hosts, and apply
Zabbix with plugin percona monitor MySQL data in the sense of Zabbix the MySQL plugin to monitor the MySQL database, but you will find that the MySQL monitoring items are very few, can not meet the needs of the company. Because its own template is too simple, so need to do more detailed monitoring, and Percona provides this detailed monitoring template and script, to solve the problem of incomplete monitori
Zabbix-server post-Installation fault handling and zabbix-agent configuration add processFault HandlingIn the first case, if the Web interface is prompted with the correct configuration of other parameters (Iptables, SELinux, etc.), such as:650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/78/0C/wKioL1Z07gSgrUvsAAC6P2ObuUM654.png "title=" capture. PNG1. PNG "alt=" Wkiol1z07gsgruvsaac6p2obuum654.png
backend, configuration-->hosts groups--> Click "Create Host Group"--Select Template tab, select Templates " Templateapp mysql,templdate OS Linux ", Last click on update 2, building the hoststemplate is provided by Zabbix system, enter Zabbix Web background,configuration-->hosts--> Click on your host name--> select template selection tab, select
Ansible Role Description:
Directory name
Description
Defaults
Default Variable Storage directory
Handlers
Handlers (actions to be taken when a change occurs)
Meta
Role dependency Processing
Tasks
Task action definition for specific execution
Templates
Template file storage Directory
VARs
Variable file dir
How does Zabbix monitor mysql services on zabbix server ?, Zabbixmysql
How to monitor mysql services on Zabbix server
1. Configure mysql
In the/etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf file, specify how the zabbix agent obtains information about the mysql service,
4. Install zabbix on the controlled end of station32
4.1: download the required package: zabbix-sender must be installed only when the controlled end is in active mode.
[[Email protected] # Yum-y localinstall \
Zabbix-2.2.3-1.el6.x86_64.rpm \ # master program server/agent are required
Zabbix-agent-2.2.3-1.el6.x86_64.rp
Guide
Zabbix is an excellent, open-source, enterprise-class monitoring software that can monitor many of the services you want to monitor with two development, this article describes the use of Zabbix's own templates to monitor MySQL services.
Configure userparameter_mysql.conf#移动到zabbix解压缩路径Cd/usr/local/src/z
Tags: specify location click down Debug DMA AMP indicator ref effectThe previous content is to use the third-party developed plug-in for MySQL monitoring, there may be some of our concern about the monitoring content is not in it, then a common method is to define our own script and integrate it into the Zabbix, so that the original monitoring based on the strong complement. The following uses a script to monitor the master-slave replication status an
here must be the same as the hostname one specified in the zabbix server to add the client.
Sample. You can enter the host name as needed, which is not associated with the Host Name of the local system.
Run the following command to install cmd:
Zabbix_agentd.exe -- install
Zabbix_agentd.ext -- start
Linux Client
Sudo apt-get install-y zabbix-agent
Modify the configuration file sudo vim/etc/
sucessed .'# End
Ii. Configure Agent auto-Registration
Shell> grep-vP '^ # | ^ $'/usr/local/zabbix_agent/etc/logs =/tmp/zabbix_agentd.log # specify the Log Path Server = 121.42.11.220 # Zabbix in passive mode server address # StartAgents = 0 # disable passive mode (after disabling, the agent will not listen to any address or port) serverActive = 121.42.11.220 # Zabbix Server address in Active Mode Hostname
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.