我昨天已将munin
配置为从另一台服务器获取日志,并且还根据配置示例自定义配置了两个服务器负载的Totals
。
我使用rrdtool
将rrd
文件转换为xml
并复制它们并将它们转换回新机器的rrd
,以便带来它的历史。
现在它运行良好,但一段时间后总数似乎已停止生成。我检查了日志,它说负载2天.png...等等找不到文件。
我检查了一下,他们在那里,chown
和chmod
匹配munin
.
关于为什么它可能看不到文件的任何想法,一旦我得到它看到它们,我如何强制完整的图形重新生成,这样我就不必等待 5 分钟来确定它是否有效?
完整日志如下:
perl
错误似乎不会影响任何事情,尽管我希望得到删除它的提示。
2013/09/10 13:45:10 Starting munin-graph
2013/09/10 13:45:10 [PERL WARNING] Use of uninitialized value in subroutine entry at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 758.
2013/09/10 13:45:10 [PERL WARNING] Use of uninitialized value $filename in concatenation (.) or string at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 775.
2013/09/10 13:45:10 [PERL WARNING] Use of uninitialized value $filename in concatenation (.) or string at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 784.
2013/09/10 13:45:10 [PERL WARNING] Use of uninitialized value $filename in concatenation (.) or string at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 786.
2013/09/10 13:45:10 [PERL WARNING] Use of uninitialized value $filename in concatenation (.) or string at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 787.
2013/09/10 13:45:10 [PERL WARNING] Use of uninitialized value in subroutine entry at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 758.
2013/09/10 13:45:10 [PERL WARNING] Use of uninitialized value $filename in concatenation (.) or string at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 775.
2013/09/10 13:45:10 [PERL WARNING] Use of uninitialized value $filename in concatenation (.) or string at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 784.
2013/09/10 13:45:10 [PERL WARNING] Use of uninitialized value $filename in concatenation (.) or string at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 786.
2013/09/10 13:45:10 [PERL WARNING] Use of uninitialized value $filename in concatenation (.) or string at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 787.
2013/09/10 13:45:10 [RRD ERROR] Unable to graph /var/www/html/munin/example.com/Totals/load2-month.png : opening '': No such file or directory
2013/09/10 13:45:10 [RRD ERROR] Unable to graph /var/www/html/munin/example.com/Totals/load2-week.png : opening '': No such file or directory
2013/09/10 13:45:10 [RRD ERROR] Unable to graph /var/www/html/munin/example.com/Totals/load2-day.png : opening '': No such file or directory
2013/09/10 13:45:10 [RRD ERROR] Unable to graph /var/www/html/munin/example.com/Totals/load2-year.png : opening '': No such file or directory
2013/09/10 13:45:10 [INFO] Graphed service example.com;Totals:load2 (0.05 sec)
2013/09/10 13:45:10 [RRD ERROR] Unable to graph /var/www/html/munin/example.com/Totals/load3-month.png : opening '': No such file or directory
2013/09/10 13:45:10 [RRD ERROR] Unable to graph /var/www/html/munin/example.com/Totals/load3-week.png : opening '': No such file or directory
2013/09/10 13:45:10 [RRD ERROR] Unable to graph /var/www/html/munin/example.com/Totals/load3-day.png : opening '': No such file or directory
2013/09/10 13:45:10 [RRD ERROR] Unable to graph /var/www/html/munin/example.com/Totals/load3-year.png : opening '': No such file or directory
RRD 错误行表示无法创建图形 (png),因为 RRD 中的某些内容无法找到(或打开)某个文件。 这个代码段说它试图打开一个空白路径,但失败了。
opening '': No such file or directory
perl 错误提到了"未初始化的值$filename",鉴于 RRD 错误可能是问题的一部分。 由于图形是从 RRD 文件中生成的,因此可能的问题是系统找不到您的 RRD。 因此,您需要检查有关指定 RRD 位置的所有内容是否正常。
- 确认 munin.conf 中的 dbdir 指令正确 无误
- 确认您的 RRD 存在于$dbdir/域/路径中
- 确认文件系统权限允许 munin 进程读取和写入所述路径
- 确认主机树(在 munin.conf 中)对于您遇到问题的客户端是正确的
关于触发图创建:munin 服务器由 cron 驱动。 您应该能够找到一个 cron 作业,您可以以 munin 用户身份手动运行该作业以触发该过程。 我过去使用的 RPM 在/etc/cron.d/munin 有这个工作