Re: [Nagios-users] I give up ....
+++ 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
Re: [Nagios-users] I give up ....
> 2006-11-13 16:28:02 REGEX: regex=m/- (\d+\.\d+)G/i > 2006-11-13 16:28:02 REGEX: perfdata= > 2006-11-13 16:28:02 REGEX: NO MATCH. > 2006-11-13 16:28:02 VALUES: [Domino][DISCO_D]:No matching > perfdata values found. > .. > > > any other hint > > Hi Danilo, Your perfdata is empty, what is your process-service-perfdata command look like? Mine looks something like: (For network socket mode:) define command{ command_name process-service-perfdata command_line /opt/nagios/contrib/udpecho 127.0.0.1 '$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n' 5667 } (For pipe mode, change command line to something like:) # command_lineecho -e '$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$' > /opt/nagios/var/rw/ngraph.pipe Notice that I am sending nagiosgrapher both the service output and the service perfdata. It seems that your plugin doesn't provide perfdata, so you'll need to send the service output as well. Thanks Giles PS There is a (rather low-volume) nagios-grapher mailing list, and this is actually slightly off-topic from the core Nagios discussion. __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - 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
Re: [Nagios-users] I give up ....
> Ahh, I am now showing my noviceness with Nagios. > > The regex below is OK, unless you don't have a gig free. > > Wouldn't this be a better regex: > graph_log_regex t=- (.+)\D [(] > > Tal > Indeed - that does look better (though I've not tested it, and am not a regex expert either). However, I messed up my syntax for ngraph so a (minor) correction would be: graph_log_regex - (.+)\D [(] I took my example from another plugin (returning temperature via t=x.x), it's not required for his plug-in. Thanks Giles __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - 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
Re: [Nagios-users] I give up ....
> graph_log_regex t=- (\d+\.\d+)G Grrr... graph_log_regex - (\d+\.\d+)G Ah better... __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - 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
Re: [Nagios-users] I give up ....
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Danilo > Sent: 13 November 2006 15:46 > To: nagios-users@lists.sourceforge.net > Subject: [Nagios-users] I give up > > > 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 > } > > Try something like: define ngraph{ service_nameDiskFree graph_log_regex t=- (\d+\.\d+)G graph_value df graph_units Gigabytes graph_legendGigabytes graph_legent_eolleft graph_legend_max100 rrd_plottypeLINE1 rrd_color 00a000 } define ngraph{ service_nameDiskFree typeCDEF graph_value cdef_df graph_units graph_legend graph_calc df rrd_plottypeLINE1 rrd_color 00a000 hideno } > > 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 :-) > > Danilo > > __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - 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
[Nagios-users] I give up ....
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 :-) Danilo - 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