Page 1 of 1
Urgent: Bandwidth Usage monitor plugin check_mrtgtraf error
Posted: Tue Mar 30, 2021 5:59 am
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.
Re: Urgent: Bandwidth Usage monitor plugin check_mrtgtraf er
Posted: Tue Mar 30, 2021 4:46 pm
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
Re: Urgent: Bandwidth Usage monitor plugin check_mrtgtraf er
Posted: Wed Mar 31, 2021 4:28 am
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.
Re: Urgent: Bandwidth Usage monitor plugin check_mrtgtraf er
Posted: Wed Mar 31, 2021 10:59 am
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.
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