Page 1 of 1

Special Characters in Service Description Field

Posted: Thu Apr 13, 2017 3:56 pm
by xyresic
We are adding url monitoring to Nagios XI via the dashboard and we're getting the following error when entering a $ into the Service Description field:

Illegal characters in service description!

Searching for this issue online we find the following link from 2014: https://support.nagios.com/forum/viewto ... 8&p=105904

It appears the issue was resolved by replacing the form_js.js file with one modified by the community. However we don't necessarily want to willy-nilly replace scripts in our Nagios environment with an unofficial script. Does Nagios have an official fix for this issue, either a hotfix or patch? Also, will newer versions of Nagios have this bug?

Thanks,
Rob

Re: Special Characters in Service Description Field

Posted: Thu Apr 13, 2017 4:15 pm
by tmcdonald
What version are you on currently? That thread is quite old and the fix may not even still be relevant, if it has not already been fixed.

In regards to putting a dollar sign in the name generally, it is typically considered an illegal character:

https://assets.nagios.com/downloads/nag ... name_chars

so you would need to modify that value as well.

Also, do note the username of the person who posted that fix originally - green names are Nagios staff, so things we post are generally considered to be safe :)

Re: Special Characters in Service Description Field

Posted: Thu Apr 13, 2017 5:14 pm
by xyresic
Haha, it was you that posted the fix.

We're on version 5.25. Does the fix you posted in 2014 fix all special characters or just the one presented by the original poster? I believe they wanted to use a colon in the description to denote a path (such as space on c: or somesuch) while we want to use a $ as part of a url in the description for url monitoring.

Here's the link to the post: https://support.nagios.com/forum/viewto ... 8&p=105904

Thanks,
Rob

Re: Special Characters in Service Description Field

Posted: Fri Apr 14, 2017 2:54 am
by xyresic
Just to clarify...we're still hesitant on applying the .js change because the file was modified for use with Nagios XI version (Nagios XI 2014R1.2) in 2014. If we go this route can you confirm these changes will work properly in this most recent version of XI?

Thanks,
Rob

Re: Special Characters in Service Description Field

Posted: Fri Apr 14, 2017 9:57 am
by mcapra
I would recommend updating to the latest version (5.4.3 as of this post) if possible. Mostly due to this fix included in 5.3.0:

Code: Select all

Fixed CCM not respecting etc/nagios.cfg illegal_object_name_chars [TPS#8864] -BH
Those are probably still hard-coded in 5.2.5 and the included JS likely isn't sufficient for this particular case. On the latest version, the changes to nagios.cfg should be sufficient.