|
|||||||||||
|
Re: [Nagios-users] Perf data / Graphs
From: Arno Lehmann <al(at)its-lehmann.de>
Date: Thu Jun 21 2007 - 16:38:35 EDT
Palle Jensen schrieb:
>> 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 Ok... I assume that what you want is the amount of used memory. This is uniquely enclosed between 'used: ' and ' Mb' and it's a decimal number. > And this is what ngraph./log shows: This line looks for digits between '...usage=' and 'Mb', which is not the format your plugin produces. > 2007-06-15 11:35:14 REGEX: perfdata=Memory Logical result, then. > The first part of check_ntmem.ncfg looks like this (there is more but it is
Try this line instead:
> graph_value Memory usage
>> 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 think it won't fit to your plugin :-( >> 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. Well, the graphs are a little different. Most of the commands are more or less directly passed to rrdtoll, so you'll need to read the man pages for that beast. The command format is a little too cryptic for me to get useful results without lots of trial and error :-) >>>> (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. No worries, as the Aussies are said to say :-) Arno > Thanks, 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@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 Received on Thu Jun 21 16:39:00 2007 This archive was generated by hypermail 2.1.8 : Thu Jun 21 2007 - 16:40:02 EDT |
||||||||||
|
|||||||||||