/var/spool/mail/root - did not eval into defined data

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

/var/spool/mail/root - did not eval into defined data

Post by Box293 »

Sometimes when I'm on the console I see the message "you have new mail in /var/spool/mail/root".

If I do "tail /var/spool/mail/root" I usually see the following:

Code: Select all

2012-12-13 08:39:22: ERROR: Target[10.236.5.1_1][_OUT_] ' $target->[494]{$mode} ' did not eval into defined data
2012-12-13 08:39:22: ERROR: Target[10.236.5.1_3][_IN_] ' $target->[495]{$mode} ' did not eval into defined data
2012-12-13 08:39:22: ERROR: Target[10.236.5.1_3][_OUT_] ' $target->[495]{$mode} ' did not eval into defined data
2012-12-13 08:39:22: ERROR: Target[10.236.5.1_4][_IN_] ' $target->[496]{$mode} ' did not eval into defined data
2012-12-13 08:39:22: ERROR: Target[10.236.5.1_4][_OUT_] ' $target->[496]{$mode} ' did not eval into defined data
2012-12-13 08:39:22: ERROR: Target[10.246.151.1_1][_IN_] ' $target->[936]{$mode} ' did not eval into defined data
2012-12-13 08:39:22: ERROR: Target[10.246.151.1_1][_OUT_] ' $target->[936]{$mode} ' did not eval into defined data
2012-12-13 08:39:22: ERROR: Target[10.246.151.1_2][_IN_] ' $target->[937]{$mode} ' did not eval into defined data
2012-12-13 08:39:22: ERROR: Target[10.246.151.1_2][_OUT_] ' $target->[937]{$mode} ' did not eval into defined data
Then when I looked at the size of /var/spool/mail/root it turns out to be 4.7GB in size.

I transferred this to my PC tried opening this from a couple of different programs but it is way too big.

I deleted the file and it was recreated pretty quickly. I will send a copy of this file to the support email address as it contains sensative information.

1) How do I resolve the issue that is occurring? I'm not particuarly fond of having log files that grow massively in size.

2) As a suggestion, perhaps XI should come with a localhost check that identifies the size of /var/spool/mail/root and alarms when it reaches a certain size.

Nagios XI 2012R1.2 VM CentOS 32bit on ESXi 5.0 Update 1.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: /var/spool/mail/root - did not eval into defined data

Post by scottwilkerson »

This is the cron for mrtg sending the error output from running the command to the root mailbox.

This is not a logfile.

you can stop the crontab from sending these by changing the following in /etc/cron.d/mrtg

change this

Code: Select all

*/5 * * * * root 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
to this

Code: Select all

*/5 * * * * root 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 2>&1 
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: /var/spool/mail/root - did not eval into defined data

Post by Box293 »

Thanks for this Scott.

Currently /etc/cron.d/mrtg contains:

Code: Select all

0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Should I just replace the whole line with what you suggested?

Code: Select all

*/5 * * * * root 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 2>&1
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: /var/spool/mail/root - did not eval into defined data

Post by lmiltchev »

This looks correct.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: /var/spool/mail/root - did not eval into defined data

Post by Box293 »

Thanks for that. I've made the changes and will monitor over time.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked