Illegal characters in variable definition

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Illegal characters in variable definition

Post by paul.jobb »

Hi;

I'm wanting to enter a regular expression in a variable value and am having a problem with the escape character \ . I am using 2014r2.0, XI 2012 used to allow it.
Capture.JPG
You do not have the required permissions to view the files attached to this post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Illegal characters in variable definition

Post by slansing »

Usually you have to double up that escape character because of how it is perceived in the database, have you tried doubling it?
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: Illegal characters in variable definition

Post by paul.jobb »

oh yes, still the same thing with \\ and \\\\
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Illegal characters in variable definition

Post by lmiltchev »

I tested this on a clean 2014R2.0 system and still got the "Illegal characters in variable definition." message because of the "\" character... Are you sure this ever worked for you in 2.0?
Be sure to check out our Knowledgebase for helpful articles and solutions!
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: Illegal characters in variable definition

Post by paul.jobb »

No it has never allowed me to add it in XI 2014 any version, I never reported it because I didn't need to use it until now

It does allow it to be added on an XI 2012 server however, just tested that on an old server no problem
Capture.JPG
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Illegal characters in variable definition

Post by abrist »

This may be due to some over zealous validation/sanitation as the character is acceptable in a number of other fields in ccm objects. I opened up a bug report: task_id=4842
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.
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: Illegal characters in variable definition

Post by paul.jobb »

Thank You
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Illegal characters in variable definition

Post by abrist »

No problem. Watch the next couple release notes for reference to a fix. 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.
Locked