Page 1 of 1

Illegal Characters in CCM

Posted: Sun Jun 09, 2013 12:40 pm
by XenoPhage
Hi there,

I have a question about the new CCM. I saw the previous post about illegal characters in the CCM. We're experiencing the same problem. I use free variables as a way to handle some command flags that need to be set on a per-host basis. In this particular instance, I'm passing the -e flag to check_http where necessary. Unfortunately, that requires passing double quotes along with the command. This change in the CCM is preventing me from doing that.

Do you have a suggestion on how this could be handled without resorting to illegal characters?

Thanks,

Re: Illegal Characters in CCM

Posted: Mon Jun 10, 2013 9:29 am
by sreinhardt
You are using this in the variable definition or the name? As far as I can tell, I don't believe the nagios core engine is restricting this, but we could be looking at different aspects. Have you tried escaping with \ at all? Otherwise -e with check_http should definitely work, it may just require some tinkering.

Re: Illegal Characters in CCM

Posted: Mon Jun 10, 2013 9:48 am
by XenoPhage
In the variable definition itself. The name I'm using is _HTTP_EXTRA and the value is -e "stuff", "stuff" ... I can add it without a problem in the legacy CCM, but the new CCM rejects it with an error about illegal characters.

Note : I'm talking about a free variable declaration, not part of a command definition.

Re: Illegal Characters in CCM

Posted: Mon Jun 10, 2013 11:04 am
by abrist
I have confirmed this behavior. Single and double quotes will trip this restriction in the new ccm. I think this will be considered a bug. I will create an internal bug fix request and we will try to get the fix out in one of the next versions. For the meantime, continue to use the legacy ccm when editing hosts with quotes in the free variable values.

Re: Illegal Characters in CCM

Posted: Mon Jun 10, 2013 11:08 am
by XenoPhage
Ok, sounds good. Thanks.

Re: Illegal Characters in CCM

Posted: Mon Jun 10, 2013 11:46 am
by abrist
No problem. You may want to watch the release notes over the next release or two so you know when it is fixed. Cheers.

Re: Illegal Characters in CCM

Posted: Mon Jun 10, 2013 2:35 pm
by abrist
Update: The bug is fixed. Attached is a zip file with the fix. Just upload it through the "Manage Components" option in XI --> "Admin".

Re: Illegal Characters in CCM

Posted: Mon Jun 10, 2013 2:58 pm
by XenoPhage
Awesome. Installed and appears to work as expected. Thanks!