Classic but not the same error : 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
CMN
Posts: 7
Joined: Thu Jan 19, 2017 2:33 am

Classic but not the same error : check_mrtgtraf

Post 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.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Classic but not the same error : check_mrtgtraf

Post 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.
Former Nagios employee
https://www.mcapra.com/
CMN
Posts: 7
Joined: Thu Jan 19, 2017 2:33 am

Re: Classic but not the same error : check_mrtgtraf

Post by CMN »

Thanks for this information.
I'll do the necessary.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Classic but not the same error : check_mrtgtraf

Post by cdienger »

Did you have any further questions for us or are we okay closing the thread?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
CMN
Posts: 7
Joined: Thu Jan 19, 2017 2:33 am

Re: Classic but not the same error : check_mrtgtraf

Post by CMN »

The post can be close
Locked