check_nt notworking GUI No unit counter specified

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dimsum
Posts: 153
Joined: Thu Aug 15, 2013 6:05 pm

check_nt notworking GUI No unit counter specified

Post 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:1115: 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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_nt notworking GUI No unit counter specified

Post 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?
Former Nagios Employee.
me.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_nt notworking GUI No unit counter specified

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dimsum
Posts: 153
Joined: Thu Aug 15, 2013 6:05 pm

Re: check_nt notworking GUI No unit counter specified

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_nt notworking GUI No unit counter specified

Post 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 \\
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked