So I am rebuilding a server from Ubuntu 12.04 to Ubuntu 14.04; not doing the upgrade path because I would rather build from scratch in this case. I have installed Munin as I have done before in Ubuntu 12.04 like this:
sudo aptitude install munin munin-node
Then I enabled the Apache modules for Munin like this:
sudo ln -s /usr/share/munin/plugins/apache_accesses /etc/munin/plugins/apache_accesses
sudo ln -s /usr/share/munin/plugins/apache_processes /etc/munin/plugins/apache_processes
sudo ln -s /usr/share/munin/plugins/apache_volume /etc/munin/plugins/apache_volume
Then I restarted the Munin node like this:
sudo service munin-node restart
And waited the requisite 5-10 minutes to get data and related graphs generated. And happily the graphs showed up! But unhappily, all the values were -nan
, meaning somehow the data was not being processed by Munin; see screenshot below:
Usually this means Munin is having problems reaching the localhost’s Apache service-status
page, but checking that URL on the system with Lynx shows everything works fine:
lynx http://localhost/server-status
So I am stumped as to what might have happened. Did a full system restart and 100% no improvement. What could be happening?
I solved this! Getting frustrated as heck about this issue, I ran a Munin module suggest command like this:
In the piles of output here are the relevant Apache related lines:
So the modules are active, but that
[LWP::UserAgent not found]
? What’s up with that? Did some Googling and found this article that explains it:Since Munin is a bunch of Perl scripts, that
LWP
error was connected tolibwww-perl
which is basically the “The World-Wide Web library for Perl.” So Munin was failing because it had no client library installed to connect to the Apache server status page. I was able to solve that issue by just installinglibwww-perl
like this:With that done, I ran that Munin module suggest command again and all looks good with no
LWP
related errors:So I just waited another 5-10 minutes and et voilà! Munin can now read the Apache server status data and the graphs are now properly updated and working as expected: