Help! check_mrtgtraf: Unable to open MRTG log file

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
DiegoSantidrian
Posts: 4
Joined: Thu May 09, 2019 1:57 pm

Help! check_mrtgtraf: Unable to open MRTG log file

Post by DiegoSantidrian »

Good afternoon everyone,

I'm Diego, I've just installed Nagios on my RedHat 6.4 Virtual Machine (on VMware Workstation) to monitor my corp switches. I also installed mrtg for monitoring ports. The thing is that when I click on a SW, it shows me 2 errors:

- For Port 1 Bandwidth Usage: check_mrtgtraf: Unable to open MRTG log file.
- For Port 1 Link Status and Uptime: Plugin timed out while executing system call.

I have tried thousands of things on forums or youtube, but it keeps showing me these errors. Please, can an internship guy get some help? THANK YOU!
Attachments
This is what Nagios shows me for the BW Usage (mrtg)
This is what Nagios shows me for the BW Usage (mrtg)
This is what Nagios shows me for the linkstatus and the uptime
This is what Nagios shows me for the linkstatus and the uptime
This is my config for the /usr/local/nagios/etc/objects/switch.cfg
This is my config for the /usr/local/nagios/etc/objects/switch.cfg
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Help! check_mrtgtraf: Unable to open MRTG log file

Post by ssax »

Please send the output of these commands:

Code: Select all

ls -ld /var/lib/mrtg
ls -l /var/lib/mrtg
DiegoSantidrian
Posts: 4
Joined: Thu May 09, 2019 1:57 pm

Re: Help! check_mrtgtraf: Unable to open MRTG log file

Post by DiegoSantidrian »

Here they go
cmsd.png
DiegoSantidrian
Posts: 4
Joined: Thu May 09, 2019 1:57 pm

Re: Help! check_mrtgtraf: Unable to open MRTG log file

Post by DiegoSantidrian »

Is that what you were asking for? lol I'm not so good at RHEL to be honest :/
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Help! check_mrtgtraf: Unable to open MRTG log file

Post by ssax »

You use MRTG to create the files in /var/lib/mrtg which creates the MRTG log, since it doesn't look like you have anything setup to do that there are no MRTG log files (or RRD files) in /var/lib/mrtg.

You will need to configure MRTG to scan your devices to create those, see here:

Code: Select all

https://oss.oetiker.ch/mrtg/
And here:

Code: Select all

http://bigunix.blogspot.com/2009/07/how-to-monitor-bandwidht-using-mrtg-and.html
DiegoSantidrian
Posts: 4
Joined: Thu May 09, 2019 1:57 pm

Re: Help! check_mrtgtraf: Unable to open MRTG log file

Post by DiegoSantidrian »

I did install MRTG and stuff, but as I saw no good configuration about it, I hashed the changes I did on those files..

I will try again with that second link you sent, thank you very much
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Help! check_mrtgtraf: Unable to open MRTG log file

Post by cdienger »

Please keep us posted!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked