Windows Service name with $ in named service

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rnygren
Posts: 20
Joined: Wed May 30, 2012 4:29 pm

Windows Service name with $ in named service

Post 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
}
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Windows Service name with $ in named service

Post by abrist »

Does it give you a more specific error, like perhaps the string that it is failing on?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
rnygren
Posts: 20
Joined: Wed May 30, 2012 4:29 pm

Re: Windows Service name with $ in named service

Post by rnygren »

It was stated in the original post
the status is yellow warning
the message string is:
SQLAgent: Error
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Windows Service name with $ in named service

Post by abrist »

Dang, I was hoping it was more verbose than that. I will try to test this tomorrow.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
rnygren
Posts: 20
Joined: Wed May 30, 2012 4:29 pm

Re: Windows Service name with $ in named service

Post by rnygren »

windows server name is SQLAgent$HEMS2008
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Windows Service name with $ in named service

Post by abrist »

Can you try doing the full escape with quotes?

Code: Select all

"SQLAgent\\$$HEMS2008"
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked