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 --- Tech Team agrif...@nagios.com On 05/21/2012 03:04 PM, Camron W. Fox wrote: > All, > > Is it possible to negate the regular expression used in > --ereg-argument-array with check_procs? > > We want to ignore one of the processes running on a machine but when we > try to use negative lookahead the regex is not processed correctly > because it reads ! as a bash internal command: > > ./check_procs -w 25 -c 35 -m CPU -v --ereg-argument-array=^((?!john).)*$ > ./check_procs -w 25 -c 35 -m CPU -v --ereg-argument-array=^((?john > --show passwd.ldap).)*$ > bash: syntax error near unexpected token `(' > > And the Nagios web output shows: NRPE: Unable to read output > > Does anyone have any suggestions? > > 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@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