Classic but not the same error : check_mrtgtraf
Posted: Tue Mar 21, 2017 5:42 am
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.
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.