Install Munin on CentOS 7

May 10, 2020

Install EPEL repository

# yum install epel-release

Install the required packages

# yum install httpd munin munin-node

Rename hostname

# vi /etc/munin/conf.d/local.conf
    use_node_name yes

Copy the apache configuration file

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

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

Uncomment following lines to require authentication

# vi /etc/httpd/conf.d/httpd_cron_graphs.conf
<Directory /var/www/html/munin>
     AuthUserFile /etc/munin/munin-htpasswd
     AuthName "Munin"
     AuthType Basic
     Require valid-user
     ExpiresActive On
     ExpiresDefault M310

Set the password

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

Start Apache and Munin

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

Configure the firewall (if required)

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

Access Munin Web Interface


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

Enable Apache plugin in Munin

How to extend GFS2 file system

comments powered by Disqus