+++ Danilo [Mon, Nov 13, 2006 at 03:45:45PM CET]: > > Ok, I am not (really not) a Perl Expert. I am simply trying to get > out some values from ngraph.log to display free space on a windows > server ... > > > This is the line that nagios gives me. > > PIPE: DB2 DISCO_D Disk ok - 25.33G (31%) free on \\10.1.1.8\d > > > My check script in nagios_grapher is > > > define ngraph { > service_name DISCO > graph_perf_regex [0-9]*\.[0-9]*G > graph_value disk_free > graph_units Bytes > graph_legend spazio libero % > rrd_plottype AREA > rrd_color 00a000 > hide yes > } > > > > can somebody help me telling the right way to write a valid and fully > functional regex to be able to catch the value (25.33G in this case) > > > Thanks a lot ..... > > > a coffee cup payed :-)))))
\s*([0-9]*\.[0-9]*)G or -\s*([0-9]*\.[0-9]*)G Btw, this stupid pseudo regex has nearly nothing to do with perl ;) Another suggestion, each time you have modified your ngraph.ncfg file. Verify that there are no unprintable chars (vi :set list) like blanks or tabs.... Ciao Frank -- Join the |****|==========| Soon bombing US World |****|==========| a small Domination |===============| country Tour 2007! |===============| near you! ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ 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