Apache 14.04上的图表和数据不在Munin中更新

所以我正在从Ubuntu 12.04重build一个服务器到Ubuntu 14.04; 没有做升级path,因为我宁愿在这种情况下从头开始构build。 我已经安装了Munin,就像我之前在Ubuntu 12.04中所做的那样:

sudo aptitude install munin munin-node 

然后,我启用了如下的Munin的Apache模块:

 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 

然后我重新启动了这个Munin节点:

 sudo service munin-node restart 

等待所需的5-10分钟,以获得数据和相关的graphics生成。 快乐的图表出现了! 但不幸的是,所有的价值都是 – -nan ,这意味着数据不是由穆宁处理; 看下面的截图:

Munin没有数据的Apache图表。

通常这意味着Munin在到达本地主机的Apache service-status页面时遇到了问题,但是使用Lynx检查系统上的URL显示一切正常:

 lynx http://localhost/server-status 

所以我被困在可能发生的事情上。 一个完整的系统重新启动,100%没有改善。 会发生什么?

Apache服务状态页面可以通过Lynx查看。

我解决了这个! 因为这个问题而沮丧,我跑了一个Munin模块,build议像这样命令:

 sudo munin-node-configure --suggest 

在成堆的输出这里是相关的Apache相关的行:

 apache_accesses | yes | no [LWP::UserAgent not found] apache_processes | yes | no [LWP::UserAgent not found] apache_volume | yes | no [LWP::UserAgent not found] 

所以模块是积极的,但[LWP::UserAgent not found] ? 那是怎么回事? 做了一些谷歌search,发现这篇文章解释它 :

这不是你可能会遇到的最有用的build议,但通过一些研究,这可能会更有意义。 幸运的是,我们可以跳过这种情况下的研究,并直接回到它的意思:Munin实际上是一个用Perl语言编写的脚本集合,而“LWP :: UserAgent”是一个Perl库。 所以没有findLWP :: UserAgent的事实意味着特定的Perl库没有安装在我们的示例片上。

因为Munin是一堆Perl脚本,所以LWP错误被连接到libwww-perl ,这基本上是“Perl的万维网库”。因此,Munin失败了,因为它没有安装客户端库来连接到Apache服务器状态页面。 我能够通过像这样安装libwww-perl来解决这个问题:

 sudo aptitude install libwww-perl 

完成之后,我再次运行那个Munin模块的build议命令,并且所有的都看起来不错,没有LWP相关的错误:

 apache_accesses | yes | yes apache_processes | yes | yes apache_volume | yes | yes 

所以我只等了5-10分钟,等等! Munin现在可以读取Apache服务器状态数据,并且graphics现在可以正常更新并按预期工作:

Munin没有数据的Apache图表。