Urgent: Bandwidth Usage monitor plugin check_mrtgtraf error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Sean Png
Posts: 4
Joined: Mon Mar 29, 2021 8:09 am

Urgent: Bandwidth Usage monitor plugin check_mrtgtraf error

Post by Sean Png »

Hi,

We have configured the Bandwidth Usage monitor plugin check_mrtgtraf and it showing the below error,

========
check_mrtgtraf: Unable to open MRTG log file
========

We have also added MRTG to Nagios Core using the below KB but doesn't resolve the issue.
=========
https://srsystemadminscripts.wordpress. ... gios-core/
=========

May I know is there any way that we can fix this issue? Can anyone advise on this case?

Awaiting for reply.

Thank you.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Urgent: Bandwidth Usage monitor plugin check_mrtgtraf er

Post by vtrac »

Hi,
You'll need to let the "check_mrtgtraf" plugin know what log file the MRTG data is being stored in.

https://www.monitoring-plugins.org/doc/ ... gtraf.html

Here's the syntax of check_mrtgtraf:

Code: Select all

check_mrtgtraf -F <log_file> -a <AVG | MAX> -w <warning_pair>
-c <critical_pair> [-e expire_minutes]
Here's a forum ticket you can look at, very helpful:
https://support.nagios.com/forum/viewto ... =7&t=11750

Please follow this source, mentioned in the ticket above:
https://www.cyberciti.biz/faq/centos-fe ... -tutorial/


Regards,
Vinh
Sean Png
Posts: 4
Joined: Mon Mar 29, 2021 8:09 am

Re: Urgent: Bandwidth Usage monitor plugin check_mrtgtraf er

Post by Sean Png »

Hi,

I have followed the thread,
https://support.nagios.com/forum/viewto ... =7&t=11750

But getting the below error,
=======
I am not getting response from the device as when providing public@localhost.

Actually our host name for the router is CER0A. May I know how to specify the same in the mentioned command? I am actually pretty confused with it.

====
cfgmaker --global 'WorkDir: /var/www/mrtg' --output /etc/mrtg/mrtg.cfg CER0A@ip_address_of the router
====

Is this the correct syntax.

Thank you.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Urgent: Bandwidth Usage monitor plugin check_mrtgtraf er

Post by vtrac »

Hi,
What is your "community" value?

That's usually defined in "snmpd.conf" (below), the default might be "public" but you have to check it yourself.

Code: Select all

/etc/snmp/snmpd.conf
Once you have the "community" string, you can run the cfgmaker command:

Code: Select all

cfgmaker --global 'WorkDir: /var/www/mrtg' --output /etc/mrtg/mrtg.cfg <yourCommunityString>@<IP address>
I suggest that you copy your original "/etc/mrtg/mrtg.cfg" file first before running the "cfgmaker" command.
it is always best to backup everything before you make a change.

Code: Select all

cp /etc/mrtg/mrtg.cfg /etc/mrtg/mrtg.cfg.org
Please follow the steps in the ticket I provided.
It is best to work with someone in your group that know your system or the network admin person.
https://support.nagios.com/forum/viewto ... =7&t=11750


Regards,
Vinh
Locked