Turn off parser processing for ARG fields?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Turn off parser processing for ARG fields?

Post by eloyd »

The search software won't let me search for "#" because it's too short, so I apologize if this has been dealt with already. Here goes:

We're using ARG1 in a check_nt type service check as the password on the remote system. For sake of example, let's say the password is Nagios#123. Turns out that when we put "Nagios#123" into the arg2 field and save it, what gets created in the Core config files is "Nagios%23123" as if it's being HTML Encoded. Not cool.

How do we turn this off, since we must use the randomly assigned passwords that the customer's security folks provide us, and saying "just give us numbers and letters" won't work.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Turn off parser processing for ARG fields?

Post by tmcdonald »

I've proposed patching the version of Core that is distributed with XI to do two things:
  • Remove comment ability entirely (not really needed in most cases)
  • Swap out ! for a non-printing character as arg separators
This would let !#; we used basically anywhere in the CCM.

Can I get a amen +1?
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Turn off parser processing for ARG fields?

Post by eloyd »

+1
Like
Friend
Retweet
Follow
Praise
#yes
Whatever it takes to make it go.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Turn off parser processing for ARG fields?

Post by tmcdonald »

I'll definitely bring it up to the devs again, but as far as a fix right now I'm thinking it will need to be a resource.cfg entry to "escape" the special characters, unfortunately.
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Turn off parser processing for ARG fields?

Post by eloyd »

i just took a moment to look through the XI 5.2.8 release notes and saw this:

Code: Select all

- Fixed using ; and # in $ARGx$ values in the CCM [TPS#8292] -JO
I'd suggest that this is very related to the problem I'm referring to, and is in fact, not working as intended.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Turn off parser processing for ARG fields?

Post by tmcdonald »

Learned something new today. # is only a comment at the beginning of a line in Core, while ; is a comment anywhere. Oh how I miss being in the trenches of Core :)

Jake is fixing this to not escape # but ; still will be for the time-being. Will be fixed in 5.2.9.
Last edited by jomann on Mon Jun 06, 2016 11:27 am, edited 2 times in total.
Reason: updated to "will be fixed" since it is already in there!
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Turn off parser processing for ARG fields?

Post by eloyd »

Groovy!
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Locked