Page 1 of 1

Classic but not the same error : check_mrtgtraf

Posted: Tue Mar 21, 2017 5:42 am
by CMN
Hello the forum,

Hope you could help me on this very classic error cause I didn't. Here it is.
I want to monitor a switch's bandwith. For this, I choose MRTG and for a real time monitoring, I've integrated it in Nagios Core 4.1.1 with Nagwin 2.5
I've done all I know (I'm novice) and I have an error on the interface : check_mrtgtraf : unable to open MRTG log file.

Here are the definitions of command and service :

define command{
command_name check_local_mrtgtraf
command_line $USER1$/check_mrtgtraf -F $ARG1$ -a AVG -w $ARG2$ -c $ARG3$ -e $ARG4$
}

define service {
use generic-service
host_name SW1800
service_description Port 1 Bandwidth Usage
check_command check_local_mrtgtraf!C:\Nagwin_x64\var\lib\mrtg\sw1800\192.168.0.240_101.log!AVG!707,3!710,4!10
}

I gave all rights and properties to the user 'nagiosadmin' on files and directories but still the same.
The funniest thing is when I execute the command from command line, with the user right, it works fine :

>check_mrtgtraf -F C:\Nagwin_x64\var\lib\mrtg\sw1800\192.168.0.240_101.log -a AVG -w 707,3 -c 710,4

Traffic CRITICAL - Avg. In = 706.0 B/s, Avg. Out = 2.4 KB/s|in=706.000000B/s;707
.000000;710.000000;0.000000 out=2.446289KB/s;3.000000;4.000000;0.000000

I'm missing something.
So thanks in advance for your help.

Re: Classic but not the same error : check_mrtgtraf

Posted: Tue Mar 21, 2017 12:36 pm
by mcapra
Nagwin is quite a substantial change over vanilla Nagios Core. I would highly recommend visiting the Nagwin community with these questions since not many of us on-staff have actually used Nagwin.

This is likely some sort of permissions/pathing issue.

Re: Classic but not the same error : check_mrtgtraf

Posted: Wed Mar 22, 2017 2:00 am
by CMN
Thanks for this information.
I'll do the necessary.

Re: Classic but not the same error : check_mrtgtraf

Posted: Wed Mar 22, 2017 9:56 am
by cdienger
Did you have any further questions for us or are we okay closing the thread?

Re: Classic but not the same error : check_mrtgtraf

Posted: Thu Mar 23, 2017 6:00 am
by CMN
The post can be close