Munin installation tips

What to do if your Drupal Munin graphs do not appear ?

The module tends to "just work". However, in some cases, munin-node will start before Apache (or whichever web server you are using) is ready. In such cases, using the default web-based plugin provided in (module)/plugins/munin-drupal will receive a connection error, and be unable to provide munin-node with the needed config information.

The simplest choice is to just restart the munin-node service after reboot is finished. On Ubuntu 10.10, for instance, you can use :

sudo restart munin-node

Earlier versions and other operating systems may have other ways to restart the service, such as :

sudo /etc/init.d/munin-node restart

Automating munin-node restart

If this proves to be sufficient, you will likely want to automate the process. On Ubuntu 10.10, and many other UNIX-like systems, you can use the /etc/cron.d/munin-node file and use an @reboot clause, like:

@reboot         root /bin/sleep 120 ; /sbin/restart munin-node

What this clause does is wait for 120 seconds after cron restart (which will always be some time after basic OS reboot), and only then restart the munin-node service.

Caveat

The format of the /etc/cron.d/munin-node is not like a typical crontab, with 5 recurrence choices and a command: like /etc/crontab, this one includes the name of the user on behalf of which the command must be ran, between the recurrence choices and the command.