Page 1 of 1

Monitor service with brackets in name

Posted: Tue Nov 22, 2022 7:26 am
by hausrocker
Hi
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)"
#	}
Does not work.

Code: Select all

No services matching myservice (backup) found : CRITICAL
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:

Code: Select all

2 services active (matching myservice) : WARNING
I have the SNMP Service enabled for user public with read only for the Nagios Server IP.

Any ideas on this?

Re: Monitor service with brackets in name

Posted: Tue Dec 13, 2022 2:56 am
by hausrocker
This forum is obviously dead and should be closed. No support at all.

I found a solution in the mean time. sc config "Old service name" displayname= "New service name" on the Windows system.