Monitor service with brackets in name
Posted: Tue Nov 22, 2022 7:26 am
Hi
I would like to monitor a service that is called "myservice (backup)" but the default command
Does not work.
The service name is exactly the display name of the windows service. I suppose the brackets are the problem.
I already found out I could also look for just "myservice" and leave the part with brackets completely away. That works unless there are 2 services that only have different information in brackets:
myservice (Main) and myservice (Backup)
Then the system returns:
I have the SNMP Service enabled for user public with read only for the Nagios Server IP.
Any ideas on this?
I would like to monitor a service that is called "myservice (backup)" but the default command
Code: Select all
#define service{
# use generic-service
# host_name MGMT011
# service_description Dienst myservice
# check_command check_snmp_win!"myservice (backup)"
# }
Code: Select all
No services matching myservice (backup) found : CRITICAL
I already found out I could also look for just "myservice" and leave the part with brackets completely away. That works unless there are 2 services that only have different information in brackets:
myservice (Main) and myservice (Backup)
Then the system returns:
Code: Select all
2 services active (matching myservice) : WARNING
Any ideas on this?