Zabbix full MySQL monitoring with fpmmm (MPM) module (Performance Monitor for MySQL)
Fpmmm is the fromdualperformance Monitor for MySQL and MariaDB and the counterpart to the MySQL Enterprisemonitor from Ora Cle. With fpmmm-can monitor your MYSQL/MARIADB databases AndAlso your database hosts (machines). Fpmmm works on Linux and SH Ould also Workon Mac OSX (and possibly some other *BSD derivatives). Windows support was plannedfor the next major release.fpmmm is the successor of MPM. MPM is renamed Tofpmmm because of the naming conflict with the Apache multi-processing Modules (MPM). Fpmmm needs a Zabbix Server for storing it performance data. There youcan see the graphs, and alerts is sent to your from there.
the words from the official website, in brief , MPM renamed Fpmmm, can cooperate with Zabbix monitoring database.
Official website:http://www.fromdual.com
Use fpmmm it can be fully monitored. MySQL database.
1. Install the dependent packages:
[Email protected] bin]# yuminstall php-cli php-process php-mysqli
2. Download fpmmm:
http://down.51cto.com/data/2239742
Https://support.fromdual.com/admin/public/download.php?product_id=0
[Email protected] install]#
wget https://support.fromdual.com/admin/download/fpmmm-0.10.6.tar.gz
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/86/F3/wKiom1fPluTDbRS3AAA0C5hQISY152.png "title=" 1.png " alt= "Wkiom1fplutdbrs3aaa0c5hqisy152.png"/>
3. Unzip:
[Email protected] install]# tar-xvffpmmm-0.10.6.tar.gz
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/86/F2/wKioL1fPlu6yKOzrAAAXCMTju0E376.png "title=" 2.png " alt= "Wkiol1fplu6ykozraaaxcmtju0e376.png"/>
4. move to the deployment location:
[Email protected] install]# mvfpmmm-0.10.6/data/server/zabbix_agent/fpmmm/
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/86/F3/wKiom1fPlvux9AiEAAAMiiT5wpg140.png "title=" 3.png " alt= "Wkiom1fplvux9aieaaamiit5wpg140.png"/>
[Email protected] install]# cd/data/server/zabbix_agent/fpmmm/
[[email protected] fpmmm]# ls
Bin CHANGELOG INSTALL Lib Tpl
5. create a MySQL monitoring account:
Mysql> Grant Process,replicationclient,replication SLAVE on * * to [e-mail protected] ' 127.0.0.1 ' identified by ' password /c2> ';
Mysql> Grant Select on Mysql.user [email protected] ' 127.0.0.1 ';
6. Create and modify the configuration file:
(Note: The list of directories configured in the case already exists, you should be aware of the existence of the directory at the time of construction, if trouble and permissions problems can be placed in the tmp directory)
[Email protected] fpmmm]# CP-PR tpl/fpmmm.conf.templatetpl/fpmmm.conf
[Email protected] fpmmm]# vimtpl/fpmmm.conf
1 [Default]
5 Type = mysqld
##### Modify the log level, it is recommended to deploy Si cho higher, easy to troubleshoot problems ######
LogLevel = 2
##### Log Location , deploy more View log, easy to debug #####
LogFile =/data/logs/zabbix/fpmmm.log
# Directory where the cache files shouldbe written to:
# # # # # # # #CacheFileBase will fpmmm+ '. + "hostname" + "." Cache naming, attention to permissions,Zabbix to this file to have read and write permissions #####
Cachefilebase =/data/server/zabbix_agent/fpmmm/fpmmm
Agentlockfile =/data/server/zabbix_agent/fpmmm/fpmmm.lock
##### local monitored mysql account password and other information, note the creation of the corresponding monitoring account #####
Username = Zabbix_fpmmm
Password = Password
Mysqlhost = 127.0.0.1
Mysqlport = 3306
29
# Zabbix Server IP Address
# # # # #zabbix address on the server #####
Zabbixserver = Zabbix server IP
32
# If section is disabled
Disabled = False
Modules = InnoDB Master MyISAM MySQL processsecurity
47
Special parameter which is used Formodule process (MySQL PID file!)
# # # # #mysql pid, can be found from my.cnf, PID file is not specified ,the PID file is the default name of the host name . PID , the stored path is in the default MySQL 's date data directory ######
Pidfile =/data/server/mysql/data/mysqld.pid
##### just monitor MySQL,db_hos comment out #####
#[db_host] # must match Hostname in zabbix!
63
#Type = mysqld
#Modules = fpmmm Server
##### Configuration Monitoring host information , the following hostname can take their own name, but to Zabbix on the Web page to add host when the configuration host hostname consistent #####
[hostname] # This must match hostname in zabbix!
73
Mysqld Type =
75
Mysqlport = 3306
# # # # #pid same as above #####
Modules = Process MySQL MyISAM innodb masterslave Security
Pidfile =/data/server/mysql/data/mysqld.pid
##### only monitor MySQL,memcached comment out #####
Bayi #[memcached] # This must match Hostname in zabbix!
82
#Type = memcached
#Modules = memcached
85
#MemcachedHost = 127.0.0.1
#MemcachedPort = 11211
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/86/F2/wKioL1fPlwvDFZPjAABm5Wq4XR8541.png "title=" 4.png " alt= "Wkiol1fplwvdfzpjaabm5wq4xr8541.png"/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/86/F3/wKiom1fPlxfju3jhAABuj8it41o239.png "title=" 5.png " alt= "Wkiom1fplxfju3jhaabuj8it41o239.png"/>
7. first try to run:
[Email protected] bin]#/data/server/zabbix_agent/fpmmm/bin/fpmmm--config=/data/server/zabbix_agent/fpmmm/tpl/ Fpmmm.conf
PHP notice:undefined Index:path In/data/server/zabbix_agent/fpmmm/bin/fpmmm.phpon Line 29
PHP notice:undefined Index:path In/data/server/zabbix_agent/fpmmm/bin/fpmmm.phpon Line 29
PHP warning:gettimeofday (): It is not safe for rely on Thesystem ' s timezone settings. You is *required* to use the Date.timezone Settingor the Date_default_timezone_set () function. In case you used any of those methodsand you is still getting this warning, you most likely misspelled the Timezoneidenti Fier. We selected ' asia/chongqing ' for ' cst/8.0/no DST ' instead in/data/server/zabbix_agent/fpmmm/lib/log.inc on line 103
Here are two questions:
PHP time zone error.
Workaround:
Modify The php.ini, find in the php.ini;d ate.timezone= Remove the front of it ; and then set data.timezone= "Asia/shanghai";
[[Email protected]~]# Vim/etc/php.ini
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/86/F2/wKioL1fPlyrDmjPkAAAaCxDTdyQ594.png "title=" 6.png " alt= "Wkiol1fplyrdmjpkaaaacxdtdyq594.png"/>
Zabbix_sender is not found , you can execute the command again and monitor the log tail-f/data/logs/zabbix/fpmmm.log See the error message: 7887:2016-09-0621:35:11.983-err:which:nozabbix_sender in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/ USR/BIN:/DATA/SERVER/MYSQL/BIN:/ROOT/BI)
Workaround: add zabbix_sender soft links in/usr/local/bin/
[Email protected] ~]# ln-s/data/server/zabbix_agent/bin/zabbix_sender/usr/local/bin/
also comment out the line of /data/server/zabbix_agent/fpmmm/bin/fpmmm.php .
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/86/F3/wKiom1fPlzah5e1CAAAJSgFm-wM610.png "title=" 7.png " alt= "Wkiom1fplzah5e1caaajsgfm-wm610.png"/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/86/F3/wKiom1fPlz6Soj2eAAALMSAmrLw327.png "title=" 8.png " alt= "Wkiom1fplz6soj2eaaalmsamrlw327.png"/>
8. Second run:
[Email protected] bin]#/data/server/zabbix_agent/fpmmm/bin/fpmmm--config=/data/server/zabbix_agent/fpmmm/tpl/ Fpmmm.conf
1
No error, the log is also normal.
9. Note, however, that after the test runs, you need to modify the permissions and the owner of several files, or you will get an error in later operations:
1). [Email protected]_agent]# chown zabbix.zabbix/data/server/zabbix_agent/fpmmm/-R
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/86/F2/wKioL1fPl0WwUvxWAABcMKdn1q0602.png "title=" 9.png " alt= "Wkiol1fpl0wwuvxwaabcmkdn1q0602.png"/>
2). [Email protected] logs]# chownzabbix.zabbix/data/logs/zabbix/-R
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/86/F2/wKioL1fPl1CwsYsQAAAZezOiLo8901.png "title=" 10.png "alt=" Wkiol1fpl1cwsysqaaazezoilo8901.png "/>
3). [Email protected] ~]# chmod 664/data/server/mysql/data/mysql.pid
4). Modify the newly generated cache file permissions (in fact the first step has been modified, can not be executed)
[[email protected] zabbix_agent] #chown Zabbix.zabbix/data/server/zabbix_agent/fpmmm/fpmmm.mysql-42.cache
Or in front of the running script to join the several command to modify permissions, so that other services restart or delete the log caused by the monitoring does not have permissions, the following can be done:
[[email protected] zabbix_agent] #vim/data/server/zabbix_agent/fpmmm/bin/fpmmm
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/86/F3/wKiom1fPl1nyZQ0LAAAmcL5jaBU616.png "title=" 11.png "alt=" Wkiom1fpl1nyzq0laaamcl5jabu616.png "/>
Modify The agent configuration file for Zabbix and add the key value at the end:
[Email protected] fpmmm]# vim/data/server/zabbix_agent/etc/zabbix_agentd.conf
Userparameter=fromdual.mysql.check,/data/server/zabbix_agent/fpmmm/bin/fpmmm--config=/data/server/zabbix_agent /fpmmm/tpl/fpmmm.conf
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/86/F3/wKiom1fPl2LjOT62AAB2EsRzrG0483.png "title=" 12.png "alt=" Wkiom1fpl2ljot62aab2esrzrg0483.png "/>
Restart the Zabbix-aget service.
Import Templates
template is in the TPL directory of the downloaded installation package
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/86/F2/wKioL1fPl2-B3_9nAABPnrSBejQ021.png "title=" 13.png "alt=" Wkiol1fpl2-b3_9naabpnrsbejq021.png "/>
Unzip the template import after download
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/86/F2/wKioL1fPl3mzijQuAAAww18FEJ0835.png "title=" 14.png "alt=" Wkiol1fpl3mzijquaaaww18fej0835.png "/>
Just import the desired line, you can import:
Template_FromDual.MySQL.server.xml Template_FromDual.MySQL.innodb.xml Template_FromDual.MySQL.master.xmlTemplate _fromdual.mysql.mysql.xml Template_FromDual.MySQL.process.xml Template_FromDual.MySQL.server.xml Template_ FromDual.MySQL.slave.xml
Add a Host:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/86/F3/wKiom1fPl4HA4BT9AABBCFuXGyI911.png "title=" 15.png "alt=" Wkiom1fpl4ha4bt9aabbcfuxgyi911.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/86/F2/wKioL1fPl5XS0_AXAAApZJUT9Sk553.png "title=" 16.png "alt=" Wkiol1fpl5xs0_axaaapzjut9sk553.png "/>
Once added, you'll see the data in the latest data
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/86/F3/wKiom1fPl5_Qj17XAAAq4YbyPIM716.png "title=" 17.png "alt=" Wkiom1fpl5_qj17xaaaq4ybypim716.png "/>
Reference: http://www.fromdual.com/fpmmm-installation-guide
This article is from the "Ixhao" blog, make sure to keep this source http://ixhao.blog.51cto.com/11988319/1847221
Zabbix with Fpmmm (MPM) for full MySQL monitoring