OK. So to make more sense of the whole thing, the only thing that is taken into account is the actual numerical value? In other words, it's automatically parsed? This is what I wasn't sure of.

Here is the entry in the mapfile I was using:



I guess the reason I'm having issues with this is the following snippet from the nagiosgraph.log:

Fri May 10 12:57:51 2013 insert.pl warn output/perfdata not recognized:
hostname:mymachine
servicedesc:Apache Processes
output:PROCS OK: 11 processes with args apache
perfdata:

the problem is there is no perfdata and the rrd file isn't being populated, (and obviously, no graph). I'm attributing this to the fact that the map file entry is wrong. This is really where my problem lies. Am I looking in the wrong place?

Thanks.





On 5/10/2013 5:11 PM, Claudio Kuenzler wrote:

    The output for one query would be:

    PROCS OK: 11 processes with args 'apache'


Well first of all you'd have to make sure that nagiosgraph also takes the output in account.
It's always better to do that with perfdata...

You have the choice to also take the output as source to parse, although I strongly recommend to use perfdata. That's what it is for.


    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?

The regex would look something like this:

/output:PROCS.*:(\d+) processes.*/

assuming that you don't care about the args and the status (OK, WARNING, CRITICAL) part.
Only the digit (11) would be taken out of the output in this case.

------------------------------------------------------------------------------
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@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

Reply via email to