Wednesday, July 21, 2010

Download and Install Munin Plugins

Munin-node (maybe depending on the package) comes with a lot of plugins; they can be found in /usr/share/munin/plugins (on a server with munin-node installed). When you install it, it checks which ones are relevant (for example, it won't add apache monitoring if you don't have any apache server installed), and add soft links to these in /etc/munin/plugins. So, to get the list of currently used plugins:

$ ls /etc/munin/plugins

acpi      if_err_eth0  irqstats     postfix_mailqueue
cpu       if_err_eth1  load         postfix_mailvolume
df        if_eth0      memory       processes
df_inode  if_eth1      netstat      swap
entropy   interrupts   open_files   vmstat
forks     iostat       open_inodes

And to see the list of available plugins:


$ ls /usr/share/munin/plugins/

acpi                    irqstats              sensors_
apache_accesses         load                  server_room_tmp
apache_processes        loggrep               smart_
apache_volume           memory                snmp__df
apt                     multips               snmp__fc_if_
apt_all                 munin_graph           snmp__fc_if_err_
courier_mta_mailqueue   munin_update          snmp__if_err_
courier_mta_mailstats   mysql_bytes           snmp__if_localhost_
courier_mta_mailvolume  mysql_isam_space_     snmp__load
cps_                    mysql_queries         snmp__processes
cpu                     mysql_slowqueries     snmp__sensors_fsc_bx_fan
cpu0                    mysql_threads         snmp__sensors_fsc_bx_temp
cpu1                    netstat               snmp__sensors_fsc_fan
cupsys_pages            nfs_client            snmp__sensors_fsc_temp
df                      nfsd                  snmp__sensors_mbm_fan
df_abs                  ntp_                  snmp__sensors_mbm_temp
df_inode                ntp_states            snmp__sensors_mbm_volt
entropy                 open_files            snmp__server_room_tmp
exim_mailqueue          open_inodes           snmp__test_temp
exim_mailstats          ping_                 snmp__users
forks                   plugins.history       squid_cache
fw_conntrack            port_                 squid_icp
fw_forwarded_local      postfix_mailqueue     squid_requests
fw_packets              postfix_mailstats     squid_traffic
hddtemp_smartctl        postfix_mailvolume    swap
if_                     processes             sybase_space
if_err_                 ps_                   uptime
interrupts              psu_                  vlan_
iostat                  sendmail_mailqueue    vlan_inetuse_
ip_                     sendmail_mailstats    vlan_linkuse_
ircu                    sendmail_mailtraffic  vmstat

There is a tool provided with munin-node which does pretty much the same, and can sometimes be useful, munin-node-configure. Run without parameter, it will list all the plugins, and say if they are used or not.


/usr/share/munin/plugins
$ sudo munin-node-configure

Plugin                            | Used | Extra information                    
------                                | ---- | -----------------                    
acpi                                 | yes  |                                      
apache_accesses             | no   |                                      
apache_processes           | no   |                                      
apache_volume               | no   |                    
[...]

As you can see, there are a lot of plugins available, and only a few that are activated. To see if a plugin is usable, run it with the "autoconf" parameter:


/usr/share/munin/plugins$ ./apache_accesses autoconf
no (no apache server-status or ExtendedStatus missing on ports 80)

The plugin will tell you "yes" if it is installable, and no, sometimes with an explicit additional error message, if it is not. You can also run munin-node-configure with the --suggest parameter to see, among the plugins which are not installed, which ones you can install, or the error messages for those you can't:


~$ sudo munin-node-configure --suggest

[sudo] password for user:
Plugin                                      | Used | Suggestions                          
------                                         | ---- | -----------                          
apache_accesses                      | no   | yes                                  
apache_processes                    | no   | yes                                  
apache_volume                       | no   | yes                                  
courier_mta_mailqueue          | no   | [spooldir not found]                  
courier_mta_mailstats             | no   | [could not find executable]          
courier_mta_mailvolume        | no   | [could not find executable]          
cpu0                                         | no   | yes        
[...]

If you find an interesting plugin which is not already installed and which is installable, you can install it by adding a link in /etc/munin/plugins:


~$ sudo ln -s /usr/share/munin/plugins/plugin_name /etc/munin/plugins/plugin_name
~$ 
sudo /etc/init.d/munin-node restart




1 comment:

  1. Thank you for sharing, I find this article is very helpful and easy to understand. Keep up the good work, guys!

    Web Hosting Services

    ReplyDelete