Re: [Nagios-users] Trying to figure out the PCRE expression for Nagiosgraph Map

2013-05-11 Thread Percy Kwong
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

Re: [Nagios-users] Trying to figure out the PCRE expression for Nagiosgraph Map

2013-05-11 Thread Percy Kwong
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:


/output:PROCS.*:(\d+) processes with args 'apache'/
and push @s, ['apache',
['connections', GAUGE, $1] ];


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.

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

Re: [Nagios-users] Trying to figure out the PCRE expression for Nagiosgraph Map

2013-05-11 Thread Claudio Kuenzler
On Sat, May 11, 2013 at 1:30 PM, Percy Kwong p...@psk.net wrote:

  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:

 /output:PROCS.*:(\d+) processes with args 'apache'/
 and push @s, ['apache',
 ['connections', GAUGE, $1] ];


This works, too, when you only want to parse the process checks for apache.

You give the RRD description the name connections. I don't think that the
number of Apache processes really represent the number of connections.
In this case, I suggest you use check_netstat.pl.



 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?


It's check_procs which doesn't create perfdata. You might  need to manually
patch it. See:
http://www.claudiokuenzler.com/blog/224/nagios-plugin-check_procs-add-performance-data-perfdata-output-nagiosgraph
--
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

Re: [Nagios-users] Trying to figure out the PCRE expression for Nagiosgraph Map

2013-05-10 Thread Claudio Kuenzler
 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