Illegal Characters in CCM

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Illegal Characters in CCM

Post 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,
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Illegal Characters in CCM

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Re: Illegal Characters in CCM

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

Re: Illegal Characters in CCM

Post 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.
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.
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Re: Illegal Characters in CCM

Post by XenoPhage »

Ok, sounds good. Thanks.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Illegal Characters in CCM

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

Re: Illegal Characters in CCM

Post 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".
You do not have the required permissions to view the files attached to this post.
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.
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Re: Illegal Characters in CCM

Post by XenoPhage »

Awesome. Installed and appears to work as expected. Thanks!
Locked