|Free Software at Schools: Installing and Maintaining a Skolelinux/Debian-edu Network; Based on Debian Sarge, prerelease pr05|
|Prev||Chapter 9. Services Out-of-the-Box in Skolelinux/Debian-edu||Next|
It might take 5-10 minutes before changes to the Munin configurationsfiles are taken into effect.
If you point your browser to the url http://tjener.intern/munin you will see that Munin is already running on your , albeit not yet properly configured. You should see something like this:Munin use a more appropriate name than localhost, replace the following stanza in the file /etc/munin/munin.conf
[localhost.localdomain] address 127.0.0.1 use_node_name yeswith something like
[tjener.intern] address 127.0.0.1 use_node_name yesNow that we have meaningful names, lets tell Munin which clients it should monitor. If you have a Thin Client server, with the "correct" ip-address of 10.0.2.10, then adding the following stanza to the file /etc/munin/munin.conf on the Mainserver will make Munin start monitoring that client:
[ltspserver00.intern] address 10.0.2.10 use_node_name yesNow we need to tell the client that the server is allowed to gather statistics, we do this by adding an extra line at the end of the file /etc/munin/munin-node.conf on the client:
When you have made changes to the file /etc/munin/munin-node.conf on the client, you must restart Munin with the command
After a few minutes you should see something like this:
Some devices are SNMP capable, and there is no need for munin-node to be installed on such a device. SNMP capable devices include printers, embedded firewalls, routers and wireless accesspoints.
I personally use the FreeBSD based m0n0wallfirewall/router as my Skolelinux/Debian-edu router, to get Munin to monitor it, I first enable SNMP on the firewall, with the community string set to public. Then you need to add a line to the file /etc/munin/munin-node.conf on the server
allow ^10\.0\.2\.2And also these two lines to the file /etc/munin/munin.conf
[gateway.intern] address 10.0.2.2
Note that eventhough the address of the device you want to monitor in this case is 10.0.2.1, you still must use the address of the server here, in this case 10.0.2.2
munin-node-configure-snmp gatewayIn my case when run against my firewall, I get this in return:
tjener:~# munin-node-configure-snmp gateway ln -s /usr/share/munin/plugins/snmp__if_err_ /etc/munin/plugins/snmp_gateway_if_err_1 ln -s /usr/share/munin/plugins/snmp__if_err_ /etc/munin/plugins/snmp_gateway_if_err_2 ln -s /usr/share/munin/plugins/snmp__if_ /etc/munin/plugins/snmp_gateway_if_1 ln -s /usr/share/munin/plugins/snmp__if_ /etc/munin/plugins/snmp_gateway_if_2You are now supposed to copy and paste these four lines above, but make sure than you modify it a little bit, so that it includes the domain intern, like this:
tjener:~# ln -s /usr/share/munin/plugins/snmp__if_err_ /etc/munin/plugins/snmp_gateway.intern_if_err_1 tjener:~# ln -s /usr/share/munin/plugins/snmp__if_err_ /etc/munin/plugins/snmp_gateway.intern_if_err_2 tjener:~# ln -s /usr/share/munin/plugins/snmp__if_ /etc/munin/plugins/snmp_gateway.intern_if_1 tjener:~# ln -s /usr/share/munin/plugins/snmp__if_ /etc/munin/plugins/snmp_gateway.intern_if_2After you have made changes to the file /etc/munin/munin-node.conf you must restart munin-node with
After a few minutes, sometimes it takes as much as 10 minutes before anything happens, you should see something like this at http://tjener.intern/munin/intern/gateway.intern.html
If you would like to test the SNMP capabilities of any of your devices, try running
snmpwalk -v 1 -c public 10.0.2.30You might be rewarded with something rather meaningless like this, which is a good sign:
tjener:~# snmpwalk -v 1 -c public 10.0.2.30 SNMPv2-MIB::sysDescr.0 = STRING: HP ETHERNET MULTI-ENVIRONMENT,ROM G.08.21,JETDIRECT,JD33,EEPROM G.08.21 SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.220.127.116.11.1 SNMPv2-MIB::sysUpTime.0 = Timeticks: (9102780) 1 day, 1:17:07.80 SNMPv2-MIB::sysContact.0 = STRING:
If you when running munin-node-configure-snmp see something like this:
Can't locate Net/SNMP.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/sbin/munin-node-configure-snmp line 29. BEGIN failed--compilation aborted at /usr/sbin/munin-node-configure-snmp line 29.then you are quit possibly missing some necessary perl stuff, I'm sure apt-get install libnet-snmp-perl will fix this.
It's also possible to use Munin together with SNMP to monitor Windows-machines.