check_mrtgtraf: Unable to open MRTG log file

I know this problem has been posted before but I didn’t see any suggestions to the problem.

I have Nagios 3.0.3 with plugins v1.4.11. I have setup snmp monitoring to log it using MRTG and I keep getting check_mrtgtraf: Unable to open MRTG log file error

Monitor bandwidth via MRTG logs

define service{
use generic-service ; Inherit values from a template
host_name hp2524_ip232
service_description Port 1 Bandwidth Usage
check_command check_local_mrtgtraf!/var/lib/mrtg/192.168.1.232_1.log!AVG!1000000,1000000!5000000,5000000!10

I created the /var/lib/mrtg/ dir and made the directory nagios group and file owner but it’s not working… I know nagios has permission as i can touch to the dir. I even created a empty log file but it didn’t help.

I followed the quick installation guide. I know snmp is working as I am monitoring uptime of the same switch and that’s working ok.

Any ideas on where to look.

I didn’t realize that I had to install and configure MRTG. I thought the plugin did both read and write to the log file.

Here is a good link on how to compile MRTG from source or run yum install mrtg if you are on redhat/centos/fedora plus how to create a basic mrtg.cfg file with cfgmaker.

oss.oetiker.ch/mrtg/doc/mrtg-unix-guide.en.html