< in command being changed to &lt;

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

< in command being changed to &lt;

Post by BanditBBS »

I am trying to create a new command that has a < in it but whenever I save the command the < is being changed to <

I know this used to work in XI2012. When I select the command it shows as < though. I am having an issue and no idea of this is causing it or not.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: < in command being changed to &lt;

Post by tmcdonald »

If it is properly saved in the config file I would assume it is just a CCM/XI bug.
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: < in command being changed to &lt;

Post by BanditBBS »

If I do a test command I get this as the command:

Code: Select all

/usr/bin/ssh nagios@********.com '/usr/bin/perl - --connect=****/****@TEST1EBS1 --mode=invalid-objects -warning=185 -critical=190' -- < /usr/local/nagios/libexec/check_oracle_health
It doesn't work from the test but I can put that command in cli and it works fine. But the checks fail saying (Return code of 127 is out of bounds - plugin may be missing).

Any hints? I know I've worked through this before and I used this at the old job and it worked fine.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: < in command being changed to &lt;

Post by tmcdonald »

Might need to use a $USERX$ for this?
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: < in command being changed to &lt;

Post by BanditBBS »

tmcdonald wrote:Might need to use a $USERX$ for this?
Huh?

Also, I just looked at the written cfg file and it does have < instead of < in it. So this ccm bug has to be part of my issue.

EDIT: I just tested, the CCM bug is my issue. I included the < in $ARG1$ and put that in the service definition and it now works. Any way for me to get this to write the command to the db/cfg file properly?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: < in command being changed to &lt;

Post by BanditBBS »

FYI - I got around this by creating the commands and putting them in a file for XI to import :) God I am sneaky :twisted:

But someone there going to create an internal bug report or do you want me to do it on the tracker? Answer that and close the thread!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: < in command being changed to &lt;

Post by abrist »

Bug reported. Closing 'er ups.
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