munin-node mysql setup

  • munin-node installed via epel repository.
  • Install perl-Cache-Cache:
    # yum install munin-node perl-Cache-Cache
  • Create file "/etc/munin/plugin-conf.d/mysql" with below contents:
    [mysql*]
    env.mysqluser munin
    env.mysqlpassword {PASS}
  • Create mysql user and assign corresponding privileges:
    mysql> create user munin@localhost identified by '{PASS}';
    mysql> GRANT PROCESS, SUPER ON *.* TO 'munin'@'localhost';
    mysql> GRANT SELECT ON `mysql`.* TO 'munin'@'localhost';
    mysql> flush privileges
  • Check the suggestions and install the plugins:
    munin-node-configure  --suggest 2>/dev/null |grep mysql
    munin-node-configure  --shell | grep mysql | sh
  • Test via:
    # cd /etc/munin/plugins
    # munin-run mysql_connections
Comment