[Nagiosplug-help] Understanding RRD conversion in map def of nagiosgraph
Peter Ringe
Peter.Ringe at web.de
Wed Oct 3 08:10:34 CEST 2007
Hi Raplh,
the plugin delivers e.g. "1234 ms", $2 will catch 1234.
to geht the value in seconds, you have to devide by 1000
so nagiosgraph will store 1.234 (or more continetal style 1,234)
in the rrd.
regards ,
Peter
Ralph.Grothe at itdz-berlin.de schrieb:
> Hello,
>
> I am currently installing nagiosgraph.
>
> The sample Perl script that defines perfdata regex matches to
> populate rrd files
> and which comes in a file simply called map
> has one match for the check_ping plugin's output (which I don't
> use)
> that looks like this:
>
>
> /output:PING.*?(\d+)%.+?([.\d]+)\sms/
> and push @s, [ ping,
> [ losspct, GAUGE, $1 ],
> [ rta, GAUGE, $2/1000 ] ];
>
>
> accompanied with this explanatory comment:
>
> In this case the database name is called 'ping' and the DS-names
> stored
> are losspct and rta. The Nagios output reports round trip time in
>
> milliseconds, so the value is multiplied by 1000 to convert to
> seconds.
> Both DS type are GAUGE.
>
>
>
> I defined a similar regex for check_icmp.
> However, what I don't understand is that the second match in $2,
> which is the RTA in ms, is devided by 1000 before pushed in the
> anon array ref onto @s.
> For my understanding it should rather be multiplied by 1000
> to convert from ms to s.
> Where am I mistaken?
>
> Rgds
>
> Ralph
>
> -------------------------------------------------------------------------
> 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/
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
More information about the Help
mailing list