Munin

Általános problémák

Munin bind address beállítása az /etc/munin/munin-node.conf-ban:

# Which address to bind to;
#host *
host 127.0.0.1

Grafikon generálás oldalnyitáskor

Forrás: http://munin-monitoring.org/wiki/CgiHowto

Függőségek telepítése:

apt-get install libapache2-mod-fastcgi libcgi-fast-perl

Munin FastCGI beállítása:

#Alias /munin /var/cache/munin/www <Location /cgi-bin/munin-fastcgi-graph> SetHandler fastcgi-script </Location> <Directory /var/cache/munin/www> Order allow,deny Allow from localhost 127.0.0.0/8 ::1 Options None # This file can be used as a .htaccess file, or a part of your apache # config file. # # For the .htaccess file option to work the munin www directory # (/var/cache/munin/www) must have "AllowOverride all" or something # close to that set. # # AuthUserFile /etc/munin/munin-htpasswd # AuthName "Munin" # AuthType Basic # require valid-user # This next part requires mod_expires to be enabled. # # Set the default expiration time for files to 5 minutes 10 seconds from # their creation (modification) time. There are probably new files by # that time. # <IfModule mod_expires.c> ExpiresActive On ExpiresDefault M310 </IfModule> </Directory>

Engedélyezd a következő beállításokat:

includedir /etc/munin/munin-conf.d graph_strategy cgi munin_cgi_graph_jobs 6 cgiurl_graph /cgi-bin/munin-fastcgi-graph max_graph_jobs 6 [szerver.tim] address 127.0.0.1 use_node_name yes

Hozzáférési jogok beállítása:

chgrp www-data /usr/share/munin/munin-graph chgrp www-data /var/log/munin /var/log/munin/munin-graph.log chmod g+w /var/log/munin /var/log/munin/munin-graph.log chgrp -R www-data /var/cache/munin/www/tim chmod -R g+w /var/cache/munin/www/tim

Logrotate beállítások módosítása:

/var/log/munin/munin-graph.log { daily missingok rotate 7 compress notifempty create 660 munin www-data # <<< }

Apache újraindítása:

/etc/init.d/apache2 restart

Plugin telepítése

Elérhető plugin-ek lekérdezése:

munin-node-configure --suggest

Symlink létrehozása

Egyszerű eset:

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

Paraméterezett eset:

ln -s /usr/share/munin/plugins/if_ /etc/munin/plugins/if_eth0 ln -s /usr/share/munin/plugins/if_ /etc/munin/plugins/if_eth1

Ellenőrizni kell a scriptet, hogy van-e benne olyan paraméter, amit be kell állítani (elérési út, felhasználó, ...) Pl. felhasználót és/vagy csoportot így lehet beállítani az dhcpd3 modulnak:

... [dhcpd3] user root group adm

Plugin tesztelése:

munin-run dhcpd3

Változások életbeléptetése:

service munin-node restart

Pluginek

git clone https://github.com/pkhamre/flashcache-munin.git

git clone https://github.com/munin-monitoring/contrib.git

lrwxrwxrwx 1 root root 40 Jun 3 16:19 apache_accesses -> /usr/share/munin/plugins/apache_accesses
lrwxrwxrwx 1 root root 60 Jun 15 12:27 apcupsd_ww -> /opt/git-3th/munin-monitoring_contrib/plugins/ups/apcupsd_ww
lrwxrwxrwx 1 root root 28 Jun 3 16:23 apt -> /usr/share/munin/plugins/apt
lrwxrwxrwx 1 root root 32 Jun 3 16:24 apt_all -> /usr/share/munin/plugins/apt_all
lrwxrwxrwx 1 root root 30 Jun 3 16:24 bind9 -> /usr/share/munin/plugins/bind9
lrwxrwxrwx 1 root root 35 Jun 3 16:25 bind9_rndc -> /usr/share/munin/plugins/bind9_rndc
lrwxrwxrwx 1 root root 28 Jun 3 14:39 cpu -> /usr/share/munin/plugins/cpu
lrwxrwxrwx 1 root root 33 Jun 3 14:39 cpuspeed -> /usr/share/munin/plugins/cpuspeed
lrwxrwxrwx 1 root root 27 Jun 3 14:39 df -> /usr/share/munin/plugins/df
lrwxrwxrwx 1 root root 33 Jun 3 14:39 df_inode -> /usr/share/munin/plugins/df_inode
lrwxrwxrwx 1 root root 34 Jun 3 14:39 diskstats -> /usr/share/munin/plugins/diskstats
lrwxrwxrwx 1 root root 32 Jun 3 14:39 entropy -> /usr/share/munin/plugins/entropy
lrwxrwxrwx 1 root root 54 Jun 19 13:42 flashcache_stats -> /opt/git-3th/pkhamre_flashcache-munin/flashcache_stats
lrwxrwxrwx 1 root root 30 Jun 3 14:39 forks -> /usr/share/munin/plugins/forks
lrwxrwxrwx 1 root root 35 Jun 3 14:39 fw_packets -> /usr/share/munin/plugins/fw_packets
lrwxrwxrwx 1 root root 33 Jun 3 16:25 hddtemp2 -> /usr/share/munin/plugins/hddtemp2
lrwxrwxrwx 1 root root 38 Jun 3 14:39 http_loadtime -> /usr/share/munin/plugins/http_loadtime
lrwxrwxrwx 1 root root 32 Jun 3 14:39 if_err_eth0 -> /usr/share/munin/plugins/if_err_
lrwxrwxrwx 1 root root 32 Jul 2 14:23 if_err_eth1 -> /usr/share/munin/plugins/if_err_
lrwxrwxrwx 1 root root 28 Jun 3 14:39 if_eth0 -> /usr/share/munin/plugins/if_
lrwxrwxrwx 1 root root 28 Jul 2 14:24 if_eth1 -> /usr/share/munin/plugins/if_
lrwxrwxrwx 1 root root 35 Jun 3 14:39 interrupts -> /usr/share/munin/plugins/interrupts
lrwxrwxrwx 1 root root 31 Jun 3 14:39 iostat -> /usr/share/munin/plugins/iostat
lrwxrwxrwx 1 root root 35 Jun 3 14:39 iostat_ios -> /usr/share/munin/plugins/iostat_ios
lrwxrwxrwx 1 root root 33 Jun 3 14:39 irqstats -> /usr/share/munin/plugins/irqstats
lrwxrwxrwx 1 root root 29 Jun 3 14:39 load -> /usr/share/munin/plugins/load
lrwxrwxrwx 1 root root 31 Jun 14 10:27 memory -> /usr/share/munin/plugins/memory
lrwxrwxrwx 1 root root 36 Jun 3 14:39 munin_stats -> /usr/share/munin/plugins/munin_stats
lrwxrwxrwx 1 root root 39 Jun 3 14:39 ntp_kernel_err -> /usr/share/munin/plugins/ntp_kernel_err
lrwxrwxrwx 1 root root 44 Jun 3 14:39 ntp_kernel_pll_freq -> /usr/share/munin/plugins/ntp_kernel_pll_freq
lrwxrwxrwx 1 root root 43 Jun 3 14:39 ntp_kernel_pll_off -> /usr/share/munin/plugins/ntp_kernel_pll_off
lrwxrwxrwx 1 root root 35 Jun 3 14:39 ntp_offset -> /usr/share/munin/plugins/ntp_offset
lrwxrwxrwx 1 root root 35 Jun 3 14:39 open_files -> /usr/share/munin/plugins/open_files
lrwxrwxrwx 1 root root 36 Jun 3 14:39 open_inodes -> /usr/share/munin/plugins/open_inodes
lrwxrwxrwx 1 root root 42 Jun 3 14:39 postfix_mailqueue -> /usr/share/munin/plugins/postfix_mailqueue
lrwxrwxrwx 1 root root 43 Jun 3 14:39 postfix_mailvolume -> /usr/share/munin/plugins/postfix_mailvolume
lrwxrwxrwx 1 root root 34 Jun 3 14:39 processes -> /usr/share/munin/plugins/processes
lrwxrwxrwx 1 root root 33 Jun 3 14:39 proc_pri -> /usr/share/munin/plugins/proc_pri
lrwxrwxrwx 1 root root 29 Jun 3 14:39 swap -> /usr/share/munin/plugins/swap
lrwxrwxrwx 1 root root 32 Jun 3 14:39 threads -> /usr/share/munin/plugins/threads
lrwxrwxrwx 1 root root 31 Jun 3 14:39 uptime -> /usr/share/munin/plugins/uptime
lrwxrwxrwx 1 root root 31 Jun 3 14:39 vmstat -> /usr/share/munin/plugins/vmstat

Ajánlott pluginek telepítése

munin-node-configure --suggest 2>/dev/null | grep '| no | yes' | cut -d' ' -f1 | grep -v '_$' | \ while read a; do echo -e "\n### $a"; ln -s /usr/share/munin/plugins/$a /etc/munin/plugins/; \ /etc/munin/plugins/$a autoconf yes; done service munin-node restart

Windows node

http://sourceforge.net/projects/munin-nodewin32/

Egyéb Munin pluginek

git clone 'https://github.com/munin-monitoring/contrib.git' /opt/git-3th/munin-monitoring_contrib

Plugin futtatása

munin-run "plugin-name"

TLS kapcsolat

http://munin-monitoring.org/wiki/MuninTLSSetup

Munin terhelés csökkentése NICE-al

# munin-node description "munin-node" author "Chuck Short <zulcss@ubuntu.com>" start on (filesystem and net-device-up IFACE=lo) stop on runlevel [!2345] env DAEMON=/usr/sbin/munin-node nice 10 ### itt csokkentjuk a prioritast expect fork respawn pre-start script mkdir -p /var/run/munin chown munin:munin /var/run/munin chmod 0755 /var/run/munin end script script [ -r /etc/default/munin-node ] && . /etc/default/munin-node exec $DAEMON $DAEMON_ARGS end script