[Nagiosplug-help] Understanding RRD conversion in map def of nagiosgraph

Ralph.Grothe at itdz-berlin.de Ralph.Grothe at itdz-berlin.de
Tue Oct 2 23:03:05 CEST 2007


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




More information about the Help mailing list