Perf data / Graphs

Palle Jensen palleje at gmail.com
Thu Jun 21 19:33:31 CEST 2007


Arno,

> Then post, for example, the output you get for the memory checks, and
> I'll see how a regex should look that matches parts of the output.

This is the output I get in nagios.log:

[1181921420] Warning: Service performance data command 'echo
'server01\tMemuse\tMemory usage: total:4485.60 Mb - used: 1452.13 Mb (32%) -
free: 3033.47 Mb (68%)\tMemory
usage=1452.13Mb;3588.48;4037.04;0.00;4485.60\n' | nc6 -u -w 3 localhost
5667' for service 'Memuse' on host 'server01' timed out after 5 seconds

And this is what ngraph./log shows:

2007-06-15 11:35:14 PIPE: server01	Memuse	Memory usage: total:4485.60
Mb - used: 1502.13 Mb (33%) - free: 2983.46 Mb (67%)	Memory
usage=1502.13Mb;3588.48;4037.04;0.00;4485.60
2007-06-15 11:35:14 REGEX: 4 blocks for 'Memuse' found.
2007-06-15 11:35:14 REGEX: graph_value=Memory usage
2007-06-15 11:35:14 REGEX: output=perfdata
2007-06-15 11:35:14 REGEX: regex=m/Memory usage=([0-9]+)Mb/i
2007-06-15 11:35:14 REGEX: perfdata=Memory
usage=1502.13Mb;3588.48;4037.04;0.00;4485.60
2007-06-15 11:35:14 REGEX: NO MATCH.
2007-06-15 11:35:14 VALUES: [server01][Memuse]:No matching perfdata values
found...

The first part of check_ntmem.ncfg looks like this (there is more but it is
pretty long):

define ngraph {
  graph_legend Memory Used
  graph_perf_regex Memory usage=([0-9]+)Mb
  graph_value Memory usage
  hide yes
  rrd_color 00a000
  rrd_plottype AREA
  service_name Memuse
}

> I use check_nt to monitor windows hosts, and the plugins return stuff like
> CPU Load 23% (5 min average) |   '5 min avg Load'=23%;80;90;0;100
> which is captures by the following ngraph configuration:
>define ngraph{
>         service_name            Windows Load
>         graph_perf_regex        =(\d+)%;
>         graph_value             load
>         graph_units             CPU Usage %
>         graph_legend            avg load
>         rrd_plottype            AREA
>         rrd_color               EACC00
>        }

>  The regex gets the digits between "=" and "%", which is stored in the
> rrd file.

I will definitely try that, thanks.

> I'm still unsure where exactly your problem is... is it understanding
> how to capture numbers from the plugin output? Or is it in setting up
> all the graphical elements you want?
Correct that is right on the spot.

>>> (Note that this is not meant as an advertisement, but rather as a last
>>> resort solution for Palle!)
>> Are you kidding??
>No.

I appreciate the help you are giving, and sharing your experience, and
apologies for misunderstanding.

Thanks,
- Palle




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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