Page 1 of 1

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

Posted: Wed Dec 12, 2012 5:23 pm
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.

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

Posted: Wed Dec 12, 2012 5:43 pm
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 

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

Posted: Thu Dec 13, 2012 3:39 pm
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

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

Posted: Thu Dec 13, 2012 4:03 pm
by lmiltchev
This looks correct.

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

Posted: Thu Dec 13, 2012 4:48 pm
by Box293
Thanks for that. I've made the changes and will monitor over time.