Nagios Graph Map file

Patrick Morris patrick.morris at hp.com
Tue Sep 11 00:21:56 CEST 2007


On Mon, 10 Sep 2007, matt wells wrote:

> Please let me know if I need to send this to another list.
> I'm attempting to resolve this map file for nagiosgraph.
> 
> Below is the information out of the 'perfdata.log' file
> 1189461916||SERVERX.EXAMPLE.COM|NT_CHECK_DISK_C||Used: 35176 MB (50%) Free: 34275 MB (49%)||
> 
> Below is my terrible attempt with the nagiosgraph 'map' file
> # Service type: ntdisk
> # check command: check_nt -H Address -v USEDDISKSPACE -lc -w 75 -c 90
> # output: c:\ - total: 25.87 Gb - used: 4.10 Gb (16%) - free 21.77 Gb (84%)
> # perfdata: c:\ Used Space=4.10Gb;19.40;23.28;0.00;25.87
> #/perfdata:.*Space=([.0-9]+)Gb;([.0-9]+);([.0-9]+);([.0-9]+);([.0-9]+)/
> /output:.*?([0-9]) MB* Free: .*?([0-9]) MB */
> and push @s, [ ntdisk,
> [ diskused, GAUGE, $1*1024**3 ],
> [ diskfree, GAUGE, $5*1024**3 ] ];
> 
> If anyone can help I'll buy you lunch in Vegas.
> 
> Wells
> 

Your regex has issues. :)

Something like this should work (with the caveat that I write regexes
about as well as I tap dance):

/output:.*Used: ([0-9]) MB .*Free: ([0-9]) MB/

I think the lack of a "." before your "*"s  is biting you.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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