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
jmac727
Posts: 35
Joined: Tue Apr 25, 2017 4:37 pm

check_mrtgtraf

Post by jmac727 »

Hi. I've just installed Nagios Core 4.3.1 on Unbuntu 16.04 and am having a hard time tracking the bandwidth on the port of my switch.

check_mrtgtraf: Unable to open MRTG log file

Is the error it's giving me. This is my first venture into Linux so I'm not very savvy with how everything works.

Also, is there a way to add the other ports of the switch to this without adding each port 1 by 1?

Please let me know if you need any other information.

Thanks!
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_mrtgtraf

Post by tgriep »

The check_mrtgtraf plugin requires MRTG to be installed and running on the server as the plugin uses the data gathered by MRTG for it's calculations.
I found this link for installing Nagios Core and graphing on Ubuntu. You could take a look at it for help.
https://raymii.org/s/tutorials/Nagios_C ... 12.04.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
jmac727
Posts: 35
Joined: Tue Apr 25, 2017 4:37 pm

Re: check_mrtgtraf

Post by jmac727 »

Thanks for the quick response. I was following that guide earlier and got to the

Code: Select all

env LANG=C /usr/bin/mrtg /usr/local/nagios/etc/mrtg.cfg
and it gave me an error attached.

Thanks!
Attachments
error.png
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: check_mrtgtraf

Post by tacolover101 »

what are the contents of the file you're running against mrtg? my guess is there may be an issue with it.

Code: Select all

/usr/local/nagios/etc/mrtg.cfg
jmac727
Posts: 35
Joined: Tue Apr 25, 2017 4:37 pm

Re: check_mrtgtraf

Post by jmac727 »

As I state before, I'm brand new to Linux. I tried to navigate to the file in /usr/local/nagios/etc/mrtg.cfg and it says I don't have permission. I also can't copy/paste between the two machines even though I've enabled bidriectional in virtual box settings.

Any help is greatly appreciated.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_mrtgtraf

Post by tgriep »

Can you login to that system using the root account so you can view the mrtg.cfg file?
You may want to try using this guide I found and see if it helps you getting MRTG setup and how the check works.
http://bigunix.blogspot.com/2009/07/how ... g-and.html
Another option is to go to another plugin that doesn't require MRTG like the one in this link below.
https://exchange.nagios.org/directory/P ... 64/details
Be sure to check out our Knowledgebase for helpful articles and solutions!
jmac727
Posts: 35
Joined: Tue Apr 25, 2017 4:37 pm

Re: check_mrtgtraf

Post by jmac727 »

I've uploaded the mrtg.cfg into a .txt file in Windows for you to view.

I was following that first guide before and was unable to successfully complete it.

gunzip -c mrtg-2.16.2.tar.gz | tar xvf -
cd mrtg-2.16.2

was the part that it wouldn't do for me.
Attachments
mrtg.txt
(7.36 KiB) Downloaded 338 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_mrtgtraf

Post by tgriep »

What was the error generated when you tried to go through the guide?
Be sure to check out our Knowledgebase for helpful articles and solutions!
jmac727
Posts: 35
Joined: Tue Apr 25, 2017 4:37 pm

Re: check_mrtgtraf

Post by jmac727 »

This is the error I get.
Attachments
targz.png
targz.png
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_mrtgtraf

Post by tgriep »

Run this command to extract MRTG tar zip file instead of the gunzip command.

Code: Select all

tar xvfz mrtg-2.17.4.tar.gz
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked