For some reason, I have a Windows Apache service with Service Name = apache2,2
I've enclosed in single and double quotes, I've tried to escape it, but nothing seems to work.
Does anyone know how to monitor a windows service with a comma in the name?
Thanks!
Monitor Windows service which contains a comma
-
cluckinchicken
- Posts: 4
- Joined: Mon Feb 27, 2012 5:23 pm
Re: Monitor Windows service which contains a comma
Have you tried wrapping it in single quotes 'apache2,2' or tried to escape the comma? "apache2\,2" It may also fall into the nasty meta characters category so it may need to set the allow_nasty_meta_chars option: http://nsclient.org/nscp/wiki/CheckExternalScripts
-
cluckinchicken
- Posts: 4
- Joined: Mon Feb 27, 2012 5:23 pm
Re: Monitor Windows service which contains a comma
Yes, I tried with single and double quotes, and escaping as well, but no dice. I'll try the nasty meta characters tomorrow and let you know.
Thanks for the help and reply jsmurphy!
Thanks for the help and reply jsmurphy!
-
cluckinchicken
- Posts: 4
- Joined: Mon Feb 27, 2012 5:23 pm
Re: Monitor Windows service which contains a comma
Thanks for your suggestion, but allow_nasty_meta_chars did not make any change unfortunately.
Re: Monitor Windows service which contains a comma
Hmmmm I can't think of anything else off the top of my head, I remember something similar to this many months back but I can't remember what the outcome was and haven't really had to implement this myself before. I think that's about all I'm able to suggest at this point in time 
Re: Monitor Windows service which contains a comma
The main nagios.cfg file has a list of object name characters that it won't allow:
You can try removing the comma from this list, but it can have unpredictable results.
Code: Select all
illegal_object_name_chars=`~!$%^&*|'"<>?,()=-
cluckinchicken
- Posts: 4
- Joined: Mon Feb 27, 2012 5:23 pm
Re: Monitor Windows service which contains a comma
@mguthrie: But that shouldn't matter when I run from the command line, eh? Or would Nagios perhaps treat it differently when called? Thanks!
Re: Monitor Windows service which contains a comma
Ah, good question, I don't know ; )
What do you get when you run this from the command-line?
What do you get when you run this from the command-line?