Page 4 of 5

Re: check_nt service state check not working

Posted: Mon Nov 25, 2019 9:26 am
by tgriep
Edit the nsclient.ini and change this line from

Code: Select all

CheckSystem = disabled
to

Code: Select all

CheckSystem = enabled
Save the change and restart NSClient++.

Run this in a shell to see if the check is fixed.

Code: Select all

./check_nt -H DALSRVPRDIIS02 -v SERVICESTATE -d SHOWALL -l eSPNaniConnector\$MN -p 12489
If so, change the command to the following.

Code: Select all

check_command         check_nt!SERVICESTATE!-d SHOWALL -l eSPNaniConnector\$MN

Re: check_nt service state check not working

Posted: Mon Nov 25, 2019 1:29 pm
by vho
We modified the nsclient.ini and ran the command in the shell and that started. The command in the config file was already the same. The issue is still there.

Re: check_nt service state check not working

Posted: Mon Nov 25, 2019 2:47 pm
by tgriep
Out of all of the combinations for escaping a $ in the service name is to do the following.

Code: Select all

-l "eSPNaniConnector$"$"MN"
All of the other examples failed.

Make sure the name of the service in the Windows server is exactly like the following.

Code: Select all

eSPNaniConnector$MN
Make the change, reboot the server so we know that the processes have been restarted.

Last thing to try is to install the latest version of Core 4.x.x.
https://support.nagios.com/kb/article/n ... ce-96.html

Re: check_nt service state check not working

Posted: Mon Nov 25, 2019 4:02 pm
by kmartin2007
tgriep wrote:Out of all of the combinations for escaping a $ in the service name is to do the following.

Code: Select all

-l "eSPNaniConnector$"$"MN"
All of the other examples failed.

Make sure the name of the service in the Windows server is exactly like the following.

Code: Select all

eSPNaniConnector$MN
Make the change, reboot the server so we know that the processes have been restarted.

Last thing to try is to install the latest version of Core 4.x.x.
https://support.nagios.com/kb/article/n ... ce-96.html
I made the change. validated the service. Did you want me to reboot the nagios server?

define service{
use production-service
host_name DALSRVPRDIIS02, DALSRVPRDIIS07
service_description MN_Connector_NANI2.0
display_name MN_Connector_NANI2.0
check_command check_nt!SERVICESTATE!-d SHOWALL -l "eSPNaniConnector$"$"MN"

Re: check_nt service state check not working

Posted: Mon Nov 25, 2019 4:07 pm
by kmartin2007
kmartin2007 wrote:
tgriep wrote:Out of all of the combinations for escaping a $ in the service name is to do the following.

Code: Select all

-l "eSPNaniConnector$"$"MN"
All of the other examples failed.

Make sure the name of the service in the Windows server is exactly like the following.

Code: Select all

eSPNaniConnector$MN
Make the change, reboot the server so we know that the processes have been restarted.

Last thing to try is to install the latest version of Core 4.x.x.
https://support.nagios.com/kb/article/n ... ce-96.html
I made the change. validated the service. Did you want me to reboot the nagios server?

define service{
use production-service
host_name DALSRVPRDIIS02, DALSRVPRDIIS07
service_description MN_Connector_NANI2.0
display_name MN_Connector_NANI2.0
check_command check_nt!SERVICESTATE!-d SHOWALL -l "eSPNaniConnector$"$"MN"



I restarted Nagios Service on the nagios server

now getting this.

MN_Connector_NANI2.0
Perform Extra Service Actions
UNKNOWN 2019-11-25 21:05:59 9d 23h 30m 55s 2/2 Failed to open service eSPNaniConnector$$MN: 1060: The specified service does not exist as an installed service.

Re: check_nt service state check not working

Posted: Mon Nov 25, 2019 4:25 pm
by tgriep
Now is seems to be adding both $ to the check.
Try this

Code: Select all

-l "eSPNaniConnector$MN"
or this

Code: Select all

-l "eSPNaniConnector"$"MN"

Re: check_nt service state check not working

Posted: Mon Nov 25, 2019 4:33 pm
by kmartin2007
tgriep wrote:Now is seems to be adding both $ to the check.
Try this

Code: Select all

-l "eSPNaniConnector$MN"
or this

Code: Select all

-l "eSPNaniConnector"$"MN"


both yeild same result


MN_Connector_NANI2.0
Perform Extra Service Actions
UNKNOWN 2019-11-25 21:32:30 9d 23h 57m 47s 2/2 Failed to open service eSPNaniConnector$$MN: 1060: The specified service does not exist as an installed service.

Re: check_nt service state check not working

Posted: Mon Nov 25, 2019 5:16 pm
by tgriep
That's weird, you put in one $ and it shows up as 2. Never seen that before.

Re: check_nt service state check not working

Posted: Mon Nov 25, 2019 6:27 pm
by kmartin2007
tgriep wrote:That's weird, you put in one $ and it shows up as 2. Never seen that before.

Yeah im at a loss here, and really frustrated. We also started observing socket timeout afer 10 second error messages on some of the servers on things that WERE working before.


CRITICAL - Socket timeout after 10 seconds


Please let us know what next steps are.

Re: check_nt service state check not working

Posted: Tue Nov 26, 2019 10:52 am
by kmartin2007
Please let us know what the next steps are.