/var/spool/mail/root

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
ciscosucks123
Posts: 17
Joined: Fri Oct 18, 2019 10:52 am

/var/spool/mail/root

Post 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 public@192.168.100.52:::::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('public@192.168.100.52:::::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:public@192.168.100.52. Skipping further queries for Host 192.168.100.52 in this round.
SNMPGET Problem for ifHCInOctets.128 ifHCOutOctets.128 on public@192.168.100.52:::::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('public@192.168.100.52:::::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:public@192.168.100.52. 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?
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: /var/spool/mail/root

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ciscosucks123
Posts: 17
Joined: Fri Oct 18, 2019 10:52 am

Re: /var/spool/mail/root

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: /var/spool/mail/root

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked