Page 1 of 1
check_nt notworking GUI No unit counter specified
Posted: Mon Nov 30, 2015 2:30 am
by dimsum
Hi There,
I was tested check_nt for windows counter. I ran in a command line it's worked.
$ ./check_nt -H MyServerIP -p 12489 -s MyPassword -v COUNTER -l "\Network Adapter(Teaming)\Bytes Received/sec"
$ output: 226504
But when I ran in nagios XI GUI it's not working I found error on service status detail is "No unit counter specified" and I found error from nslicent.log
error:modules\CheckSystem\CheckSystem.cpp

ERROR: \Network Adapter\(Teaming\)\Bytes Received/sec: PdhAddCounter failed: Unable to parse the counter path. Check the format and syntax of the specified path
What is \(Teaming\) ?? How can I fix it.
Thank in advance.
Re: check_nt notworking GUI No unit counter specified
Posted: Mon Nov 30, 2015 11:14 am
by hsmith
Can you try to change the quotes to single quotes(') instead of double quotes(") and check if it is working on the GUI?
Re: check_nt notworking GUI No unit counter specified
Posted: Mon Nov 30, 2015 8:16 pm
by Box293
Your service definitions are going to need double \\
For example this was defined in $ARG3$ after running the Windows Server Wizard.
Code: Select all
-l "\\Paging File(_Total)\\% Usage","Paging File usage is %.2f %%" -w 70 -c 90
Re: check_nt notworking GUI No unit counter specified
Posted: Mon Nov 30, 2015 9:52 pm
by dimsum
Hi Thanks for you reply,
I try changed " to ' and use \\ but the in the command when I ran in testing the result is the same previous error. I don't understand why the GUI insert \ before the () automatically. somebody know please explain what is it and can I remove it.
My servers are running on windows 2012.
Thanks you.
Re: check_nt notworking GUI No unit counter specified
Posted: Tue Dec 01, 2015 12:12 am
by Box293
I can see you are running into a problem which can lead to the issue you are having.
The problem is the use of some special characters in the service check AND using the "Test Check Command" button. Due to some issues with how PHP escapes characters the "Test Check Command" does not work in these situations and should be ignored.
So for all further testing of this service you need to:
Make the changes to the service
Save the Service
Apply Configuration
Go back to the home screen and find the Service
When viewing the Service Status Details page click the Schedule a forced immediate check link
Just to re-iterate, for all further testing for this service DO NOT use the "Test Check Command" button, follow the steps above.
Also, keep in mind my original advice about needing the double \\