Monitor...hreshold(3)
okay bestie, welcome to the Monitoring::Plugin::Threshold(3) manpage β it's a user-contributed Perl doc and literally the internal class for handling thresholds in Monitoring::Plugin. let's get into it π
β¨ NAME β¨
Monitoring::Plugin::Threshold β the iconic class for handling Monitoring::Plugin thresholds. no cap.
π SYNOPSIS π
real talk: this is an internalMonitoring::Pluginclass. if you're looking for the public interfaces, you want to seeMonitoring::Pluginitself, iykyk.
here's the whole thing in code form, bestie:
# NB: This is an internal Monitoring::Plugin class.
# See Monitoring::Plugin itself for public interfaces.
# Constructor
$t = Monitoring::Plugin::Threshold->set_thresholds(
warning => $warning_range_string,
critical => $critical_range_string,
);
# Value checking - returns CRITICAL if in the critical range,
# WARNING if in the warning range, and OK otherwise
$status = $t->get_status($value);
# Accessors - return the associated N::P::Range object
$warning_range = $t->warning;
$critical_range = $t->critical;
so like, set_thresholds is the constructor β you pass in warning and critical range strings and it gives you back a threshold object. then get_status($value) checks a value and returns:
CRITICALif it's in the critical rangeWARNINGif it's in the warning rangeOKotherwise
and the accessors warning and critical return the associated N::P::Range object for each. slay. π
π¦ DESCRIPTION π¦
okay so this is the internal Monitoring::Plugin class for handling threshold data. again, if you want the public interfaces, go see Monitoring::Plugin. this is just the behind-the-scenes bestie doing the work. π«Ά
a threshold object contains (typically) a pair of ranges, associated with a particular severity. like:
warning => range1
critical => range2
it's giving "two ranges, two severities, one iconic object". periodt. π
π AUTHOR π
this code is maintained by the Monitoring Plugin Development Team β see https://monitoring-plugins.org for all the deets. they're the real MVPs, fr fr. π₯
π COPYRIGHT AND LICENSE π
Copyright (C) 2014 by Monitoring Plugin Team
Copyright (C) 2006-2014 by Nagios Plugin Development Team
this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so like, it's free, it's open, it's iconic. ngl, that's a vibe. π
and that's the whole vibe, bestie! this page was served up by perl v5.42.0 on 2018-08-02, and you're reading the Monitor...hreshold(3) manpage. stay slaying β¨π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Monitoring-Plugin 0.40-bp160.1.8 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms