I’m trying to check a service’s status with check_nt. The service has a $ sign in its name and I can’t change that. The following command works fine in a terminal window if issued manually - please note the simple quotes surrounding the service$name, which seems to be needed in this case:
check_nt -H -v SERVICESTATE -l ‘service$name’
However, when Nagios does its check, it strips the simple quotes (which is good) and appends an extra $ at the end (which is not good at all). I get the following warning in Nagios:
Thanks Luca. With the escaped $ Nagios builds the full service$name correctly without the need to use the simple quotes, but it still appends the extra $ at the end, like service$name$.
I could probably create a dummy service with a proper name and make it dependent on the service$name service so that when the real service goes down, then the dummy will stop too, and monitor the dummy one in Nagios. I just want to avoid it if possible.
Have you got any more ideas why would Nagios append the $?
Sorry folks, this forum removed the backslash from before the $$.
I appeal to your imagination. There is supposed to be a leading backslash in front of $$.