Page 1 of 1

Windows Service name with $ in named service

Posted: Mon Mar 10, 2014 1:14 pm
by rnygren
In Windows 2003 I had a work around functioning by prefixing the $ with \\$$ for a single $ in the service name
When I upgraded to nagios
4.0.1 I now get warning SQLAgent: Error

When ever try something different I get a red error service not found!

Has anyone found a fix?

here is how the service is defined:

define service{
use engine
host_name rmh-eq2-02
service_description SQLAgent-HEMS2008
check_command check_nt!SERVICESTATE! -d SHOWALL -l SQLAgent\\$$HEMS2008
servicegroups windows service
}

Re: Windows Service name with $ in named service

Posted: Mon Mar 10, 2014 3:30 pm
by abrist
Does it give you a more specific error, like perhaps the string that it is failing on?

Re: Windows Service name with $ in named service

Posted: Mon Mar 10, 2014 4:14 pm
by rnygren
It was stated in the original post
the status is yellow warning
the message string is:
SQLAgent: Error

Re: Windows Service name with $ in named service

Posted: Mon Mar 10, 2014 4:51 pm
by abrist
Dang, I was hoping it was more verbose than that. I will try to test this tomorrow.

Re: Windows Service name with $ in named service

Posted: Tue Mar 11, 2014 3:29 pm
by rnygren
windows server name is SQLAgent$HEMS2008

Re: Windows Service name with $ in named service

Posted: Tue Mar 11, 2014 5:04 pm
by abrist
Can you try doing the full escape with quotes?

Code: Select all

"SQLAgent\\$$HEMS2008"