apache and munin not working together on freebsd

I came across an issue with Apache 2.2 on freebsd 8.2 where munin wasn’t graphing the Apache data. (apache_accesses, apache_processes and apache_volume )

When I tailed the munin error log I found this error.

[[email protected]~]#tail /var/log/munin/munin-node.log
munin UserAgent not found at apache_volume line 86.
With some researching on google I found this nice munin command to tell me more about how to setup munin. IE what we can install on freebsd.

/usr/local/sbin/munin-node-configure –suggest
The output gave us “LWP::UserAgent not found”. which means, install Perl’s libwww.

To fix this error we install p5-libwww

[[email protected]~]#cd /usr/ports/www/p5-libwww/
[[email protected]~]#make install clean

Restart munin and everything should now work.

[[email protected]~]# ./usr/local/etc/rc.d/munin-node restart