Character "\" inserted into regex on save - check_ncpa.py
Posted: Wed May 22, 2019 2:36 pm
Good afternoon,
I am having an issue with setting up a service check using check_ncpa.py. I am using a match=regex to monitor the services on a remote host for a series of SQL Anywhere databases, however I am trying to filter out any that are ending with "Training". I have the check working when I do a "Run Check Command", however when I go to save the check settings to apply in the configuration I have noticed that a "\" is automatically being inserted in my regex.
Here is the regex that is working:
-t '<<token>>' -P 5693 -M services -q match=regex,service='(^SQL)(?!.*Training).*'
However when I save the check, the below parameters are what is saved:
-t '<<token>>' -P 5693 -M services -q match=regex,service='(^SQL)(?\!.*Training).*'
I've not been able to locate any information in the NCPA documentation indicating why the character is being entered and was hoping that the forum might offer some additional information.
Nagios XI Version is 5.5.11
check_ncpa.py version is 1.1.3
NCPA Version is 2.1.6
I am having an issue with setting up a service check using check_ncpa.py. I am using a match=regex to monitor the services on a remote host for a series of SQL Anywhere databases, however I am trying to filter out any that are ending with "Training". I have the check working when I do a "Run Check Command", however when I go to save the check settings to apply in the configuration I have noticed that a "\" is automatically being inserted in my regex.
Here is the regex that is working:
-t '<<token>>' -P 5693 -M services -q match=regex,service='(^SQL)(?!.*Training).*'
However when I save the check, the below parameters are what is saved:
-t '<<token>>' -P 5693 -M services -q match=regex,service='(^SQL)(?\!.*Training).*'
I've not been able to locate any information in the NCPA documentation indicating why the character is being entered and was hoping that the forum might offer some additional information.
Nagios XI Version is 5.5.11
check_ncpa.py version is 1.1.3
NCPA Version is 2.1.6