[Nagios-users] check_procs and negating regex in --ereg-argument-array
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 -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com -- 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
Re: [Nagios-users] check_procs and negating regex in --ereg-argument-array
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
Re: [Nagios-users] check_procs and negating regex in --ereg-argument-array
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 -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com -- 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
[Nagios-users] Nagios - can it send email when leaving a service comment?
I'd like nagios to send an email after I leave a service comment through the web dashboard. The purpose of this would be that it would send a mail to the contact list that someone is working on the issue at hand and to track this information over time (how long it takes to resolve and issue and what the solution was and so forth). Is support for Nagios being able to send a mail when leaving a service comment built in? -- 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