Page 1 of 2
Service monitoring escaping characters
Posted: Fri Jan 15, 2021 11:53 pm
by emartine
I am having a problem trying to monitor a window service named
QsMAgE (servername)(UnifiedCalendarSync_)
This is the same for the description as well as the name of the service. How can I escape these characters to monitor the status of the service?
Re: Service monitoring escaping characters
Posted: Mon Jan 18, 2021 4:54 pm
by vtrac
Hi emartine,
Could you please show me the "Service Name" and "Display Name" of this running service?
Open "Task Manager" > Services > "QsMAgE (servername)(UnifiedCalendarSync_)" > right click "Open Services" > right click "Properties" of "QsMAgE (servername)(UnifiedCalendarSync_)"
Here's an example of "AxInstSV" showing "Service Name" and "Display Name":
M1.png
Here's an example of running check of "AxInstSV" using either "Service name" and "Display name":
Code: Select all
./check_nt -H XXX.XXX.XXX.XXX -p 12489 -s 'XXXXX' -v SERVICESTATE -d SHOWALL -l AxInstSV
AxInstSV: Stopped
./check_nt -H XXX.XXX.XXX.XXX -p 12489 -s 'XXXXX' -v SERVICESTATE -d SHOWALL -l "ActiveX Installer (AxInstSV)"
ActiveX Installer (AxInstSV): Stopped
M2.png
Regards,
Vinh
Re: Service monitoring escaping characters
Posted: Tue Jan 19, 2021 10:32 am
by emartine
They are all like this and putting quotes around them doesn't find the service:
SERVICE_NAME: QsMAgE (servername)(UnifiedCalendarSync_5)
DISPLAY_NAME: Quest Migration Agent for Exchange (servername)(UnifiedCalendarSync_5)
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_nt -H xx.xx.xx.xx -p 1248 -v SERVICESTATE -l "QsMAgE (servername)(UnifiedCalendarSync)" -d SHOWALL
Failed to open service QsMAgE (servername)(UnifiedCalendarSync): 424: The specified service does not exist as an installed service.
[nagios@nagiosxi~]$ /usr/local/nagios/libexec/check_nt -H xx.xx.xx.xx -p 1248 -v SERVICESTATE -l "Quest Migration Agent for Exchange (servername)(UnifiedCalendarSync)" -d SHOWALL
Failed to open service Quest Migration Agent for Exchange (servername)(UnifiedCalendarSync): 424: The specified service does not exist as an installed service.
It does exist.
Re: Service monitoring escaping characters
Posted: Tue Jan 19, 2021 10:53 am
by emartine
[nagios@nagiosxi~]$ /usr/local/nagios/libexec/check_nt -H xx.xx.xx.xx -p 1248 -v SERVICESTATE -d SHOWALL -l "eventlog"
eventlog: Started
works for event log so I know the service is connecting so it must need some escape characters.
Position of -d SHOWALL doesn't matter either.
[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_nt -H xx.xx.xx.xx -p 1248 -v SERVICESTATE -d SHOWALL -l "QsMAgE (servername)(UnifiedCalendarSync)"
Failed to open service QsMAgE (servername)(UnifiedCalendarSync): 424: The specified service does not exist as an installed service.
[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_nt -H xx.xx.xx.xx -p 1248 -v SERVICESTATE -d SHOWALL -l "Quest Migration Agent for Exchange (servername)(UnifiedCalendarSync)"
Failed to open service Quest Migration Agent for Exchange (servername)(UnifiedCalendarSync): 424: The specified service does not exist as an installed service.
Re: Service monitoring escaping characters
Posted: Wed Jan 20, 2021 12:41 pm
by vtrac
Hi emartine,
Thanks for getting back with the "Service Name" and "Display Name" (below).
SERVICE_NAME: QsMAgE (servername)(UnifiedCalendarSync_5)
DISPLAY_NAME: Quest Migration Agent for Exchange (servername)(UnifiedCalendarSync_5)
Your test commands (from your previous reply) were missing the "_5" at the end of both "Service Name" and "Display Name".
So, please try again with the correct "Service Name" and "Display Name":
Code: Select all
/usr/local/nagios/libexec/check_nt -H xx.xx.xx.xx -p 1248 -v SERVICESTATE -d SHOWALL -l "QsMAgE (servername)(UnifiedCalendarSync_5)"
/usr/local/nagios/libexec/check_nt -H xx.xx.xx.xx -p 1248 -v SERVICESTATE -d SHOWALL -l "Quest Migration Agent for Exchange (servername)(UnifiedCalendarSync_5)"
Regards,
Vinh
Re: Service monitoring escaping characters
Posted: Wed Jan 20, 2021 2:33 pm
by emartine
There are 8 services starting with _ all the way to _10 so that isn't a problem.
Re: Service monitoring escaping characters
Posted: Wed Jan 20, 2021 2:44 pm
by vtrac
Based on the "Server Name" and "Display Name" I got back from you,
SERVICE_NAME: QsMAgE (servername)(UnifiedCalendarSync_5)
DISPLAY_NAME: Quest Migration Agent for Exchange (servername)(UnifiedCalendarSync_5)
Please let me know if the following works or not:
Code: Select all
/usr/local/nagios/libexec/check_nt -H xx.xx.xx.xx -p 1248 -v SERVICESTATE -d SHOWALL -l "QsMAgE (servername)(UnifiedCalendarSync_5)"
Regards,
Vinh
Re: Service monitoring escaping characters
Posted: Wed Jan 20, 2021 3:53 pm
by emartine
It does not work.
Re: Service monitoring escaping characters
Posted: Wed Jan 20, 2021 4:11 pm
by vtrac
Hi,
You said that there are 8 to 10 running processes.
Can you please do the following and update those "Service Name" and "Display Name" here:
Regards,
Vinh
Re: Service monitoring escaping characters
Posted: Fri Jan 22, 2021 7:05 pm
by emartine
Please close and delete this thread I found someone else to help me local and resolve the character issue. Thanks!