check_mrtgtraf

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

check_mrtgtraf

Post 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
jrdalrymple
Posts: 16
Joined: Fri Nov 13, 2015 4:49 pm

Re: check_mrtgtraf

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_mrtgtraf

Post 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.
Former Nagios employee
Locked