Page 1 of 1

Nagios noisy emails

Posted: Fri Oct 14, 2016 2:36 pm
by w-bao
We receive this email every 5 minutes which overfloods our linux postmaster's inbox. I tried the ways listed in this forum but no luck. https://support.nagios.com/forum/viewto ... =6&t=34916

Subject "Cron <root@vm-monmgttst1-tts> LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok"

"Subroutine SNMP_Session::pack_sockaddr_in6 redefined at /usr/local/share/perl5/Exporter.pm line 66.
at /usr/bin/../lib/mrtg2/SNMP_Session.pm line 149.
Subroutine SNMP_Session::unpack_sockaddr_in6 redefined at /usr/local/share/perl5/Exporter.pm line 66.
at /usr/bin/../lib/mrtg2/SNMP_Session.pm line 149.
Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at /usr/local/share/perl5/Exporter.pm line 66.
at /usr/bin/../lib/mrtg2/SNMP_Session.pm line 604.
Subroutine SNMPv1_Session::unpack_sockaddr_in6 redefined at /usr/local/share/perl5/Exporter.pm line 66.
at /usr/bin/../lib/mrtg2/SNMP_Session.pm line 604."

How can I get rid of these emails?

Re: Nagios noisy emails

Posted: Fri Oct 14, 2016 4:08 pm
by gormank
Looks like its cron sending mail to root saying its running a perl script that's failing and outputting errors. Crons are not supposed to output anything--ever...
I'd log in as root, run crontab -l and look for a cron that runs a perl script every 5 minutes. If there's any doubt or multiples, I'd crontab -e (understand vi before doing this) and comment the entry. Then wait to see if the mail stops. Once you find the right entry, fix the script and redirect the cron output to null (> /dev/null 2>&1) if I remember right.

It doesn't look like its related to Nagios.

Re: Nagios noisy emails

Posted: Sun Oct 16, 2016 8:01 pm
by Box293
This KB article should resolve your issue:

https://support.nagios.com/kb/article.php?id=526

Re: Nagios noisy emails

Posted: Tue Oct 18, 2016 1:06 pm
by w-bao
After I made the changes to SNMP_Session.pm, recommended by the KB, the issue is resolved. Thank you!

Re: Nagios noisy emails

Posted: Tue Oct 18, 2016 1:48 pm
by avandemore
I'm closing this thread. If you have any further issues please open a new one. Thanks for using Nagios forums!