Вы просматриваете: Главная > Web сервер > Установка и настройка плагинов мониторинга Munin для MySQL

Установка и настройка плагинов мониторинга Munin для MySQL

Тут огромное количество возможных пунктов мониторинга и всё через небольшое количество плагинов:

ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_bin_relay_log’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_commands’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_connections’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_files_tables’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_innodb_bpool’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_innodb_bpool_act’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_innodb_insert_buf’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_innodb_io’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_innodb_io_pend’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_innodb_log’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_innodb_rows’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_innodb_semaphores’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_innodb_tnx’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_myisam_indexes’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_network_traffic’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_qcache’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_qcache_mem’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_replication’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_select_types’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_slow’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_sorts’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_table_locks’
ln -s ‘/usr/share/munin/plugins/mysql_’ ‘/etc/munin/plugins/mysql_tmp_tables’

/etc/init.d/munin-node restart
munin-node-configure —suggest | grep mysql

Возможны ошибки в логах:
2015/11/07-21:35:15 [16617] Error output from mysql_:
2015/11/07-21:35:15 [16617] Missing dependency Cache::Cache at /etc/munin/plugins/mysql_ line 728.
2015/11/07-21:35:15 [16617] Service ‘mysql_’ exited with status 255/0.
или при проверке через munin-node-configure:
mysql_ | yes | no [Missing dependency Cache::Cache]
необходимо доустановить пакет:
apt-get install libcache-cache-perl

Или такая ошибка:

[DBI connect(‘mysql;mysql_read_default_file=/etc/mysql/debian.cnf;mysql_connect_timeout=5′,’debian-sys-maint’,…) failed: Access denied for user ‘debian-sys-maint’@’localhost’ (using password: YES)]

Такого юзверя в системе нет, поэтому добавляем его, даем привилегии
mysql -u root -p
CREATE USER ‘debian-sys-maint’@’localhost’ IDENTIFIED BY ‘84630984’;
GRANT ALL PRIVILEGES ON *.* TO ‘debian-sys-maint’@’localhost’;
FLUSH PRIVILEGES;

mcedit /etc/munin/plugin-conf.d/munin-node
добавляем в секцию mysql использование пароля

/etc/init.d/munin-node restart
munin-node-configure —suggest | grep mysql

cd /usr/share/munin/plugins/
munin-run mysql_commands

Метки: , ,


Оставить отзыв