wget https://launchpadlibrarian.net/165454254/libmemcached-1.0.18.tar.gz tar xvf libmemcached-1.0.18.tar.gz cd libmemcached-1.0.18 ./configure make && make install
wget https://pecl.php.net/get/memcached-2.2.0.tgz tar xvf memcached-2.2.0.tgz cd memcached-2.2.0 phpize ./configure --disable-memcached-sasl make && make install
# Information for MySQL connections: Username = fpmmm_agent Password = secret MysqlHost = 127.0.0.1 MysqlPort = 3306
# Zabbix Server IP address ZabbixServer = zabbix-server-ip
# Special parameter which is used for module process (MySQL PID file!) PidFile = /home/mysql/data/mysqld.pid
# Here you could enter the hostname of your machine (uname -n) [hostname] # This MUST match Hostname in Zabbix! Type = mysqld Modules = fpmmm server
# Here you could add a random name of your MySQL/MariaDB instance [hostname] # This MUST match Hostname in Zabbix! Type = mysqld MysqlPort = 3306 Modules = process mysql myisam innodb master slave security PidFile = /home/mysql/data/mysqld.pid
数据库中添加监控用户
1 2 3 4 5
CREATEUSER'fpmmm_agent'@'127.0.0.1' IDENTIFIED BY'secret'; GRANT PROCESS ON*.*TO'fpmmm_agent'@'127.0.0.1'; GRANT REPLICATION CLIENT ON*.*TO'fpmmm_agent'@'127.0.0.1'; GRANTSELECTON mysql.user TO'fpmmm_agent'@'127.0.0.1'; GRANT REPLICATION SLAVE ON*.*TO'fpmmm_agent'@'127.0.0.1';
测试 fpmmm 查看日志
1 2 3 4 5 6
/etc/zabbix/fpmmm-0.10.6/bin/fpmmm --config=/etc/fpmmm/fpmmm.conf 1 cat /tmp/fpmmm/fpmmm.log ... 3423:2017-04-01 17:58:18.746 - INFO: FromDual Performance Monitor for MySQL and MariaDB (fpmmm) (0.10.6) run started. 3423:2017-04-01 17:58:20.262 - INFO: FromDual Performance Monitor for MySQL and MariaDB (fpmmm) run finished (rc=0).