Displaying performance data with
Nagios::Plugin is just as simple as processing thresholds. All you need to do is run the function
add_perfdata with a few parameters, and the rest is handled by
$np->add_perfdata( label ⇒ "size", value ⇒ $size, uom ⇒ "kB", threshold ⇒ $np->threshold(), );
label defines the name of the variable.
value contains the measured value,
uom defines the unit of measurements, in this case KB.
threshold expects a threshold object, which is generated with the function
threshold(). The thresholds must already have been set, with
The output is shown automatically when
nagios_exit is run, provided that the performance data were defined before ...