Install Munin on CentOS 7

Install EPEL repository

1
# yum install epel-release

Install the required packages

1
# yum install httpd munin munin-node

Rename hostname

1
# vi /etc/munin/conf.d/local.conf
1
2
3
[hostname]
    address 127.0.0.1
    use_node_name yes

Copy the apache configuration file

There is an issue on CentOS 7 for munin-2.0.54-1.el7.noarch.

1
# cp /usr/share/doc/munin-common-2.0.54/httpd_cron_graphs.conf /etc/httpd/conf.d

Uncomment following lines to require authentication

1
# vi /etc/httpd/conf.d/httpd_cron_graphs.conf
1
2
3
4
5
6
7
8
<Directory /var/www/html/munin>
     AuthUserFile /etc/munin/munin-htpasswd
     AuthName "Munin"
     AuthType Basic
     Require valid-user
     ExpiresActive On
     ExpiresDefault M310
</Directory>

Set the password

1
# htpasswd -c /etc/munin/munin-htpasswd admin

Start Apache and Munin

1
2
# systemctl enable httpd && systemctl start httpd
# systemctl enable munin-node && systemctl start munin-node

Configure the firewall (if required)

1
2
# firewall-cmd --permanent --add-service=http
# firewall-cmd --reload

Access Munin Web Interface

http://hostname/munin

Important file and directories

  • Master configuration file: /etc/munin/munin.conf
  • Configuration file for Apache: /etc/httpd/conf.d/httpd_cron_graphs.conf
  • Cron file: /etc/cron.d/munin
  • Directory for log files: /var/log/munin
  • Web directory: /var/www/html/munin
  • File for credentials: /etc/munin/munin-htpasswd
  • Directory for enabled plugins: /etc/munin/plugins
  • RRD location: /var/lib/munin

Useful commands

  • View which plugins are enabled: munin-node-configure
  • Display a table of plugins that will probably work: munin-node-configure --suggest
  • Print shell commands to install the plugins: munin-node-configure --shell
  • Install all plugins with “yes” on suggestion column: munin-node-configure --shell | sh