Page 1 of 1

check_mrtgtraf

Posted: Sat Nov 21, 2015 5:41 pm
by rlinux57
Getting below error and service definition:

Code: Select all

check_mrtgtraf: Unable to process MRTG log file 

Code: Select all

define service{
        use                          generic-service ; Inherit values from a template
        host_name               SW-1
        service_description   Port 1 Bandwidth Usage
        check_command       check_local_mrtgtraf!/var/www/mrtg/192.168.1.253_1.log!30,40!100,200!10
        }

Code: Select all

ls -al /var/www/mrtg/
total 0
drwxrwxrwx. 2 nagios nagios 32 Nov 21 17:12 .
drwxr-xr-x. 5 root   root   42 Nov 21 17:16 ..
-rw-r--r--. 1 nagios nagios  0 Nov 21 17:12 192.168.1.253_1.log

Re: check_mrtgtraf

Posted: Sun Nov 22, 2015 9:12 am
by jrdalrymple
rlinux57 wrote:-rw-r--r--. 1 nagios nagios 0 Nov 21 17:12 192.168.1.253_1.log
your MRTG file is empty - verify your mrtg config - I noticed you have another thread indicating an SNMP issue - they're maybe related.

Re: check_mrtgtraf

Posted: Mon Nov 23, 2015 11:29 am
by tmcdonald
Let's also check your RRD files for MRTG. Not entirely certain how you installed MRTG on your system, but on mine they are located under /var/lib/mrtg - run ls -l against them.

For good measure, let's also see what MRTG says about your configs. Same deal, not sure where your binaries and whatnot ended up, but on my system that would be:

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

If it returns no output, that's a good thing. Otherwise, post back whatever it spits out.