You'll need to install EPEL.
yum -y install epel-release
Install some packages:
yum -y install munin-node munin-common munin-apache munin-cgi munin httpd
We'll then start munin-node to generate some data for the local host:
systemctl enable munin-node
systemctl start munin-node
Deploy /etc/httpd/munin_cgi_graphs.conf:
<VirtualHost *:80>
ServerName localhost
ServerAdmin root@localhost
ErrorLog /var/log/httpd/munin.localhost-error.log
CustomLog /var/log/httpd/munin.localhost-access.log combined
DocumentRoot /var/www/html
# Rewrites for graph/html generated by cgi
RewriteEngine On
RewriteRule ^/munin/static/(.*) /var/www/html/munin/static/$1 [L]
RewriteRule ^/munin/graph/(.*) /munin-cgi/munin-cgi-graph/$1 [L,PT]
RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-html/$1 [L,PT]
RewriteRule ^/munin$ /munin/ [R]
ScriptAlias /munin-cgi/ /var/www/html/munin/cgi/
# FastCGI
<Directory "/var/www/html/munin/cgi">
Options +ExecCGI
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Directory>
</VirtualHost>
Deploy a munin config file to enable collecting of data from the local host:
/etc/munin/conf.d/local.conf:
graph_strategy cgi
html_strategy cgi
cgiurl_graph /munin/graph
[localhost]
address 127.0.0.1
use_node_name yes
Finally, restart apache (httpd)
systemctl restart httpd
Wait 5 minutes the open http://<munin-host-ip>/munin (e.g. http://192.168.56.100/munin where 192.168.56.100 is the IP address of the host where we just installed munin)
References:
Tags:
- munin munin-server
- centos redhat centos7 redhat7
- cgi dynamic
- apache httpd