Page 1 of 1

/var/spool/mail/root

Posted: Fri Nov 15, 2019 11:44 am
by ciscosucks123
I started noticing the following message when logging into my NagiosXI server

Code: Select all

You have mail in /var/spool/mail/root
If i perform a cat on the mail folder i get a bunch of the following errors:

Code: Select all

2019-10-24 01:50:03: WARNING: Expected a number but got 'noSuchInstance'
2019-10-24 01:50:03: WARNING: Expected a number but got 'noSuchInstance'
SNMPGET Problem for ifHCInOctets.166 ifHCOutOctets.166 on [email protected]:::::3:v4only: No response from remote host "192.168.100.52" at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 594.
        Net_SNMP_util::snmpget('[email protected]:::::3:v4only', 'HASH(0x3168520)', 'ifHCInOctets.166', 'ifHCOutOctets.166') called at /usr/bin/mrtg line 2330
        main::getsnmparg('HASH(0x2750798)', 'HASH(0x316d2a8)', 'HASH(0x263e168)', 'HASH(0x2af3fb0)') called at /usr/bin/mrtg line 2510
        main::readtargets('HASH(0x2750798)', 'ARRAY(0x27db048)', 'HASH(0x263e168)') called at /usr/bin/mrtg line 403
        main::main called at /usr/bin/mrtg line 143
2019-10-24 01:50:03: WARNING: skipping because at least the query for ifHCInOctets.166 on  192.168.100.52 did not succeed
2019-10-24 01:50:03: WARNING: no data for ifHCInOctets&ifHCOutOctets:[email protected]. Skipping further queries for Host 192.168.100.52 in this round.
SNMPGET Problem for ifHCInOctets.128 ifHCOutOctets.128 on [email protected]:::::3:v4only: No response from remote host "192.168.100.52" at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 594.
        Net_SNMP_util::snmpget('[email protected]:::::3:v4only', 'HASH(0x312be58)', 'ifHCInOctets.128', 'ifHCOutOctets.128') called at /usr/bin/mrtg line 2330
        main::getsnmparg('HASH(0x2750798)', 'HASH(0x312f9a0)', 'HASH(0x263e168)', 'HASH(0x2af3fb0)') called at /usr/bin/mrtg line 2510
        main::readtargets('HASH(0x2750798)', 'ARRAY(0x27db048)', 'HASH(0x263e168)') called at /usr/bin/mrtg line 403
        main::main called at /usr/bin/mrtg line 143
2019-10-24 01:50:03: WARNING: skipping because at least the query for ifHCInOctets.128 on  192.168.100.52 did not succeed
2019-10-24 01:50:03: WARNING: no data for ifHCInOctets&ifHCOutOctets:[email protected]. Skipping further queries for Host 192.168.100.52 in this round.
2019-10-24 01:50:15: ERROR: Target[192.168.100.57_136][_IN_] ' $target->[126]{$mode} ' did not eval into defined data

Any ideas on where i should look to resolve this issue?

Re: /var/spool/mail/root

Posted: Fri Nov 15, 2019 4:34 pm
by mbellerue
Looks like some MRTG messages are getting thrown to root's local mail account. Is the only date in there 2019-10-24? Or does it continue on to today?

Re: /var/spool/mail/root

Posted: Fri Dec 20, 2019 11:54 am
by ciscosucks123
sorry for the delay. Looks like this is continuous even after clearing out the mailbox. How can i reset the MRTG2 snmp configuration? It appears it could be trying to query devices no longer available in Nagios.

Re: /var/spool/mail/root

Posted: Fri Dec 20, 2019 1:02 pm
by scottwilkerson
This happens any time a cron job has any errors.

You can eliminate this for the mrtg cron by editing /etc/cron.d/mrtg

from this

Code: Select all

*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios
to this

Code: Select all

*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios >/dev/null 2>&1