From 5384e06a2a7c1814e914c24c8432bb06b62af0e4 Mon Sep 17 00:00:00 2001 From: Radu Rendec Date: Sat, 1 Apr 2023 19:36:50 -0400 Subject: [PATCH] Replace Nagios::Plugin with Monitoring::Plugin Nagios::Plugin has been deprecated and generates the following warning: | Nagios::Plugin is deprecated, use Monitoring::Plugin instead. | at /usr/share/perl5/vendor_perl/Nagios/Plugin/Functions.pm line 14 The Monitoring::Plugin API seems to be a drop-in replacement, at least for the purposes of the check_apache plugin. --- check_apache | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/check_apache b/check_apache index 58d4cde..7f706fa 100755 --- a/check_apache +++ b/check_apache @@ -10,9 +10,9 @@ check_apache - Nagios plugin to poll Apache mod_status information use strict; -use Data::Dumper; ### For generating debug output in verbose mode -use LWP::UserAgent; ### For communicating with the webserver -use Nagios::Plugin; ### For communicating with the nagios server +use Data::Dumper; ### For generating debug output in verbose mode +use LWP::UserAgent; ### For communicating with the webserver +use Monitoring::Plugin; ### For communicating with the nagios server ### Know what we're working with @@ -427,7 +427,7 @@ my $available_measurements = join(', ', sort(keys(%measurements))); ### Initialize the plugin -my $plugin = Nagios::Plugin->new( +my $plugin = Monitoring::Plugin->new( shortname => "APACHE", usage => "Usage: check_apache -H -m " ."(-w -c ) [-P ] " @@ -830,7 +830,7 @@ L module installed. Thresholds given to this script should be in the format specified at . -This module is built upon L by the Nagios Plugin Development +This module is built upon L by the Monitoring Plugin Team. Further reading on Nagios, NPRE, and Nagios Plugins is available at .