Trying to figure out the PCRE expression for Nagiosgraph Map

Percy Kwong psk at psk.net
Fri May 10 21:46:38 CEST 2013


I'm writing a pcre rule for a nagios map file.

The output for one query would be:

PROCS OK: 11 processes with args 'apache'

What would the map rule look like that would do the following?

1. Begin with "PROCS OK:"
2. End with "args 'apache'"
3. Extract only the numeric value before the word processes?

Assuming it would be a nested regex within the regex.

So basically, the map regex would only return 11, but enforce the rules 
above?

Just trying to understand the logic behind this.

Thanks.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
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