我在下面列出了munin.conf的一部分
# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime # something changes (OK -> WARNING,CRITICAL -> OK,etc)#contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm\contact.prashanth.command echo "Munin notification" | sendmail -t xxx@xxx.netcontact.prashanth.always_send warning criticalcontact.root.command echo "Munin notification" | sendmail -t xxxl@xxx.netcontact.root.always_send warning criticalcontact.pipevia.command | /home/prashanth/script.sh /home/prashanth/script.sh
这些都不起作用.这是munin-limits.log
2011/09/26 14:58:12 Opened log file2011/09/26 14:58:12 [INFO] Starting munin-limits,getting lock /var/run/munin/munin-limits.lock2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 722.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 725.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 740.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 754.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 759.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $text in length at /usr/share/perl5/Munin/Master/limitsold.pm line 774.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $res[3] in join or string at /usr/share/perl5/Munin/Master/limitsold.pm line 777.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 722.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 725.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 740.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 754.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 759.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $text in length at /usr/share/perl5/Munin/Master/limitsold.pm line 774.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $res[15] in join or string at /usr/share/perl5/Munin/Master/limitsold.pm line 777.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 722.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 725.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 740.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 754.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 759.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $text in length at /usr/share/perl5/Munin/Master/limitsold.pm line 774.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $res[1] in join or string at /usr/share/perl5/Munin/Master/limitsold.pm line 777.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 722.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 725.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 740.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 754.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/limitsold.pm line 759.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $text in length at /usr/share/perl5/Munin/Master/limitsold.pm line 774.2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $res[1] in join or string at /usr/share/perl5/Munin/Master/limitsold.pm line 777.2011/09/26 14:58:12 Baz?2011/09/26 14:58:12 [INFO] munin-limits finished (0.02 sec)2011/09/26 14:58:12 Command "prashanth" stderr: Munin notification - this is a test mail from the user prashanth | sendmail -t xxx@xxx.net
我在这里缺少什么,为什么没有发送电子邮件?
解决方法 要为Munin发送警报,您需要设置两件事.如果未设置这两个项目,则不会发送邮件.这就是我将Munin配置为在Munin正在运行的机器上通过localhost发送电子邮件的方式.请与您所拥有的相比较相应调整:contact.myalert.command mail -s "MUNIN - ${var:group} :: ${var:host}" mymail@domain.comcontact.myalert.always_send warning critical
然后在主机树下我有这个设置.注意联系人myalert行:
# a simple host tree[localhost.localdomain] address 127.0.0.1 use_node_name yes contacts myalert总结
以上是内存溢出为你收集整理的linux – Munin电子邮件通知全部内容,希望文章能够帮你解决linux – Munin电子邮件通知所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)