mrtg cron job

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

mrtg cron job

Post by kendallchenoweth »

We have a cron job on NagiosXI that is producing this error.

Code: Select all

root@nagios-aws-us-qa /etc/cron.d$ /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
-----------------------------------------------------------------------
ERROR: Mrtg will most likely not work properly when the environment
       variable LANG is set to UTF-8. Please run mrtg in an environment
       where this is not the case. Try the following command to start:

       env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok 
We're not using Nagios to monitor a network device using mrtg. Do we need this cron job?

Thanks!
kyang

Re: mrtg cron job

Post by kyang »

The command you posted doesn't look right. In the /etc/cron.d/mrtg file it should be

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
Replace the one you have with the one I posted above.

You should keep the cron in there in case you ever do decide to run the switch wizard and use mrtg. Just so it doesn't create more issues for you.

Let us know if that clears the error.
Locked