Nagios noisy emails

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
w-bao
Posts: 33
Joined: Mon Apr 04, 2016 11:57 am

Nagios noisy emails

Post 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?
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Nagios noisy emails

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios noisy emails

Post by Box293 »

This KB article should resolve your issue:

https://support.nagios.com/kb/article.php?id=526
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
w-bao
Posts: 33
Joined: Mon Apr 04, 2016 11:57 am

Re: Nagios noisy emails

Post by w-bao »

After I made the changes to SNMP_Session.pm, recommended by the KB, the issue is resolved. Thank you!
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Nagios noisy emails

Post by avandemore »

I'm closing this thread. If you have any further issues please open a new one. Thanks for using Nagios forums!
Previous Nagios employee
Locked