Difference between revisions of "Munin"

From YobiWiki
Jump to navigation Jump to search
Line 61: Line 61:
 
 
 
====Other plugins====
 
====Other plugins====
More info on plugins incl. how to write yours: http://munin.projects.linpro.no/wiki/plugins
+
More info on plugins incl. how to write yours: http://munin.projects.linpro.no/wiki/HowToWritePlugins

Revision as of 22:47, 29 November 2006

Munin is a nice Monitoring framework

Sites

Installation

On the collector

apt-get install munin libdate-manip-perl

Configure /etc/munin/munin.conf to add nodes to collect

On each node

apt-get install munin-node libnet-snmp-perl libio-socket-ssl-perl libcrypt-des-perl libdigest-hmac-perl libio-socket-inet6-perl libwww-perl libnet-irc-perl smartmontools ethtool

Maybe you will have to relax the firewall when installing munin otherwise install will stall during plugin detection if loopback connections to port 3128 are dropped.
Bind the monitor only to the wanted IP in /etc/munin/munin-node.conf and tell which server can get the info:

host <my_ip>
allow ^<regex IP of the collector>$ (see examples)

Select plugins from /usr/share/munin/plugins by adding a symlink in /etc/munin/plugins
To know if a plugin could work, try it with argument "autoconf", if it says yes then it is usable otherwise look inside the plugin code (perl) for hints.
Some plugins require some options to be configured, do that in /etc/munin/plugin-conf.d/munin-node

apache_* plugin

Activate apache2 extended status (cf http://www.debian-administration.org/articles/161):
Install mod_info:

a2enmod info

Activate in /etc/apache2/apache2.conf the section:

<Location /server-status> etc 

and add just above this section the following line:

ExtendedStatus On
/etc/init.d/apache2 force-reload

Add to /etc/munin/plugin-conf.d/munin-node:

[apache_*]
env.lrrd_url "http://<my_ip>:%d/server-status?auto"

ip_ plugin

Add to /etc/munin/plugin-conf.d/munin-node (normally it is already done in the last versions):

[ip_*]
user root

Add iptables dummy rules to collect stats on a particular IP:

iptables -A INPUT -d <ip>;iptables -A OUTPUT -s <ip>

Install the plugin for this ip:

ln -s /usr/share/munin/plugins/ip_ /etc/munin/plugins/ip_<ip>

sensors_ plugin

Usually you create symlinks calles sensors_fan, sensors_volt and sensors_temp.

I had many troubles after a kernel upgrade:
Now the output of "sensors" features a "phantom" chip w83627hf-i2c-0-28 with no valid values, aside the 2 others, w83782d-i2c-0-29 and w83627hf-isa-0290.
One more or less correct way would be to e.g. add an entry at the end of /etc/sensors.conf with

chip "w83627hf-i2c-*"
   ignore in0
   ...

But sth is really wrong no way to get a section only considered by the -isa- and the other by -i2c-, whatever I tried both sections were submitted to the same filtering rules :-(

Last resort was to change the output of sensors when called by munin:
In /etc/munin/plugin-conf.d/munin-node:

[sensors_]
env.sensors=sensors|sed '1,+14d'                                                                                                        

Other plugins

More info on plugins incl. how to write yours: http://munin.projects.linpro.no/wiki/HowToWritePlugins