Page 1 of 2
Windows Service Monitoring Error
Posted: Tue Dec 29, 2020 1:40 pm
by dsilvero
cap1.jpg
Hi guys, I lookng for a solution for this issue with windows service monitoring, I have Nagios XI and I monitoring many windows services of this server, with this command: $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$ and everything work ok.
But, when I try to monitor the windows services names:
PISqlDas.RTQP
Give me this error:
(Return code of 127 is out of bounds. Check if plugin exists)
I capture the config screen and paste the $ARG2$ content:
-d SHOWALL -l "$SERVICEDESC$" ;PISqlDas.RTQP=started
The problem is the dot in service name ? , how I can bypass this error ?
Thanks very much in advance
Diego
Re: Windows Service Monitoring Error
Posted: Wed Dec 30, 2020 12:12 pm
by vtrac
Hi Diego,
After doing some research and testing, looks like the error you were getting might be related to not having NSClient installed on your remote Windows server.
Here are example of my tests, checking if services are running (Started or Stopped) on my remote windows which have NSClient service (nscp) running:
Code: Select all
# ./check_nt -H 192.168.254.80 -p 12489 -s 'myPASS' -v SERVICESTATE -d SHOWALL -l http
http: Started
# ./check_nt -H 192.168.254.80 -p 12489 -s 'myPASS' -v SERVICESTATE -d SHOWALL -l nscp
nscp: Started
# ./check_nt -H 192.168.254.80 -p 12489 -s 'myPASS' -v SERVICESTATE -d SHOWALL -l captureservice
captureservice: Stopped
However, when I checked for service "PISqlDas.RTQP", which I don't have .... my error is "service not exist":
Code: Select all
# ./check_nt -H 192.168.254.80 -p 12489 -s 'myPASS' -v SERVICESTATE -d SHOWALL -l PISqlDas.RTQP
Failed to open service PISqlDas.RTQP: 424: The specified service does not exist as an installed service.
So, looks like you need to install NSClient on your remote Windows for "check_nt" to works.
Here are instructions on how to install and configure NSClient agent:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Best Regards,
Vinh
Re: Windows Service Monitoring Error
Posted: Tue Jan 05, 2021 3:59 pm
by dsilvero
Thank you Vinh for you help, in this server the nsclient was installed and working fine, I put here an capture of this server monitoring services to see that the only service monitoring that not working is PISqlDas.RTQP(in this case you can see the service description), and all anothers services monitoring are working fine
Thank you very much !!!
Re: Windows Service Monitoring Error
Posted: Wed Jan 06, 2021 11:47 am
by ssax
Please edit the failing service and change the
$ARG1$ from this:
Code: Select all
-d SHOWALL -l "$SERVICEDESC$" ;PISqlDas.RTQP=started
To this:
Then save, apply configuration, and force a check.
Re: Windows Service Monitoring Error
Posted: Fri Jan 08, 2021 1:59 pm
by dsilvero
Thank you Ssax for you reply, I modified the $ARG02$ (not $ARG01$), but the services name contain illegal characters like:
PI SQL Data Access Server (RTQP Engine)
and give me error, how can I bypass this error ?
Thank you for you patience
Diego
Re: Windows Service Monitoring Error
Posted: Mon Jan 11, 2021 4:27 pm
by cdienger
Can you provide a screenshot of the error?
Also, what version of XI is this? Some versions the "Run check command" button will produce an error, but if you look at the status of the service in the dashboard it will show up correctly. Please check this.
Re: Windows Service Monitoring Error
Posted: Mon Jan 11, 2021 4:34 pm
by ssax
Are you referring to the XI CCM service description containing special chars or the $ARG2$ value?
If the service description, I'd recommend you remove the parens
() from the service description but given the way you have it setup to use the own services $SERVICEDESC$ you'll likely need to do this:
Edit
/usr/local/nagios/etc/nagios.cfg and change this:
Code: Select all
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
To this:
Code: Select all
illegal_object_name_chars=`~!$%^&*|'"<>?,=
Then restart the nagios service.
Then apply configuration.
Re: Windows Service Monitoring Error
Posted: Tue Jan 12, 2021 9:52 am
by dsilvero
Hi Ssax, I delete () from /usr/local/nagios/etc/nagios.cfg in
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
and restart Nagios Service
But, when I put () in service description, still show me an error, any idea ?
Thank you very much !!!
Re: Windows Service Monitoring Error
Posted: Wed Jan 13, 2021 12:43 pm
by vtrac
Hi Diego,
Could you please show me the "Service Name" and "Display Name" of this running service?
Open "Task Manager" > Services > "PI SQL Data Access Server" > right click "Open Services" > right click "Properties" of "PI SQL Data Access Server"
Here's an example of "AppRediness":
AppReadiness.png
I have tested and you can use either "Server Name" or "Display Name" with the "-l" option (example):
Code: Select all
[root@vt-nagiosxi-62 libexec]# ./check_nt -H 192.168.254.102 -p 12489 -s 'VT9900' -v SERVICESTATE -d SHOWALL -l AppReadiness
AppReadiness: Stopped
Code: Select all
[root@vt-nagiosxi-62 libexec]# ./check_nt -H 192.168.254.102 -p 12489 -s 'VT9900' -v SERVICESTATE -d SHOWALL -l "App Readiness"
App Readiness: Stopped
I am thinking we can "rename" the PI SQL service name, if needed to.
Regards,
Vinh
Re: Windows Service Monitoring Error
Posted: Thu Jan 14, 2021 9:38 am
by dsilvero
Hi Vtrac, I send you the capture with detail of the service
I run the command:
[xxxxxx libexec]$ ./check_nt -H PARCCVWPIEDA01 -p 12489 -s 'VT9900' -v SERVICESTATE -d SHOWALL -l PI SQL Data Access Server (RTQP Engine)
bash: syntax error near unexpected token `('
Here I put with " " in the service description and give me this error, my nsclient don“t have an password:
[xxxxxx libexec]$ ./check_nt -H PARCCVWPIEDA01 -p 12489 -s 'VT9900' -v SERVICESTATE -d SHOWALL -l "PI SQL Data Access Server (RTQP Engine)"
NSClient - ERROR: Invalid password.
Thank you very much !!!!