因此,我正在将一个服务器从Ubuntu12.04重新构建到Ubuntu14.04;不执行升级路径,因为在本例中我宁愿从头开始构建。我安装了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分钟才能得到数据和相关的图表。很高兴这些图表出现了!但不幸的是,所有的值都是-nan,这意味着Munin没有对数据进行处理;参见下面的屏幕截图:

通常这意味着Munin在访问localhost的Apache service-status页面时遇到了问题,但是使用Lynx检查系统上的URL显示一切正常:
lynx http://localhost/server-status所以我对可能发生的事情感到困惑。做了一个完整的系统重新启动,100%没有改进。会发生什么事?

发布于 2016-01-14 05:34:13
我解决了这个问题!对于这个问题我感到非常沮丧,我运行了一个Munin模块建议命令,如下所示:
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]呢?怎么回事?谷歌找到了这篇解释它的文章:
这并不是最有用的建议,你很可能会遇到,当然,但通过一些研究,它可能更有意义。幸运的是,我们可以跳过本例中的研究,直接讨论它的含义: Munin实际上是用Perl语言编写的脚本集合,而"LWP::UserAgent“是一个Perl库。因此,没有找到LWP::UserAgent这一事实意味着在我们的示例片中没有安装特定的Perl库。
由于Munin是一堆Perl脚本,所以LWP错误被连接到libwww-perl,这基本上就是“Perl的万维网库”。所以Munin失败了,因为它没有安装客户端库来连接到Apache服务器状态页面。我只需要像这样安装libwww-perl就可以解决这个问题:
sudo aptitude install libwww-perl完成后,我再次运行了module命令,所有命令看起来都很好,没有与LWP相关的错误:
apache_accesses | yes | yes
apache_processes | yes | yes
apache_volume | yes | yes 所以我又等了5-10分钟!Munin现在可以读取Apache服务器状态数据,并且这些图表现在已经按预期正确更新和工作:

https://serverfault.com/questions/748987
复制相似问题