User Tools

Site Tools


blog:munin

Munin

Munin installation on archlinux

It follows mostly archlinux wiki. Just adding some tweaks.

First tweak is to change permissions to /var/log/munin. Else, munin-cgi-* can't write logs there and hangs.

chmod 777 /var/log/munin

Maybe lesser permissions could be used, but I should take a look for that. (I think multiple users write to this folder : root, munin, http)

Next tweak is for cgi graph. Same permission problem : user http needs write access to /var/lib/munin/cgi-tmp/ :

chown -R http:http /var/lib/munin/cgi-tmp

Munin installation on debian

First, install needed packages :

apt-get install munin munin-node

Edit munin config file to set the hostname of the machine to monitor :

vim /etc/munin/munin.conf

# a simple host tree
[localhost] -> change to [yourhostname]
    address 127.0.0.1
    use_node_name yes

Configure nginx :

vim /etc/nginx/sites-available/munin

Here is the config :

server {
    server_name vhost.org;
    #listen 80;
    root /var/cache/munin/www/;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }
    
    # TODO : enable cgi graph
}

Enable the site :

ln -s /etc/nginx/sites-available/munin /etc/nginx/sites-enabled/

Restart services :

service php-fastcgi restart
service nginx restart

Enable munin service at boot : (TODO)

update-rc.d ...

Start service to test now without reboot :

service start munin
service start munin-node

Data gather is done using cron every 5 minutes

smartctl plugin fix

smartctl patch : /usr/share/munin/plugins/smart_:127
-smart_values[string.replace(smart_attribute[1],'-','_')]={"value":smart_attribute[3],"threshold":smart_attribute[5]}
+smart_values[string.replace(smart_attribute[1],'-','_')]={"value":smart_attribute[9],"threshold":smart_attribute[5]}

Thresholds should be adjusted.

Plugins management

Plugins in munin are activated by putting a symbolic link in /etc/munin/plugins/

It can be verified with this :

ls -l /etc/munin/plugins

To disable a plugin, remove the symbolic link.

Ex : to remove entropy plugin :

rm /etc/munin/plugins/entropy

To enable it again :

ln -s /usr/share/munin/plugins/entropy /etc/munin/plugins/

blog/munin.txt · Last modified: 2015/06/19 23:43 by popux