check_procs and negating regex in --ereg-argument-array

Alex Griffin agriffin at nagios.com
Wed May 23 16:41:40 CEST 2012


Okay, then it appears check_procs does not support that syntax. Negation 
of longer strings like that requires a backtracking implementation of 
"regular expressions" (the quotes are there because this kind of regular 
expression is actually NOT a regular expression in the strict computer 
science sense), and is not supported by most traditional UNIX tools. 
Unfortunately, I'm not sure there's a good way to make this work. 
Hopefully someone else can come up with an alternative solution.

Alex Griffin
---
Tech Team
agriffin at nagios.com

On 05/21/2012 05:08 PM, Camron W. Fox wrote:
> On 12/05/21 11:29 AM, Alex Griffin wrote:
>> To get around the issue of bash interpreting your regex characters as
>> something else, simply wrap the regex in single quotes:
>>
>> ./check_procs -w 25 -c 35 -m CPU -v --ereg-argument-array='^((?!john).)*$'
>>
>> Alex Griffin
>
> Alex,
>
> 	I already tried that and this was the error:
>
> /usr/lib64/nagios/plugins/check_procs -w 25 -c 35 -m CPU -v
> --ereg-argument-array='^((?!john).)*$'
> PROCS UNKNOWN: Could not compile regular expression - Invalid preceding
> regular expression
>
> 	with the message on the web output being: PROCS UNKNOWN: Could not
> compile regular expression - Invalid preceding regular expression
>
> Best Regards,
> Camron
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list