Special Characters in Service Description Field

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
xyresic
Posts: 3
Joined: Thu Apr 13, 2017 12:59 am

Special Characters in Service Description Field

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Special Characters in Service Description Field

Post 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 :)
Former Nagios employee
xyresic
Posts: 3
Joined: Thu Apr 13, 2017 12:59 am

Re: Special Characters in Service Description Field

Post 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
xyresic
Posts: 3
Joined: Thu Apr 13, 2017 12:59 am

Re: Special Characters in Service Description Field

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Special Characters in Service Description Field

Post 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.
Former Nagios employee
https://www.mcapra.com/
Locked