From 1e2387474a449452b78520b9ad96a8b4b5e99722 Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Wed, 17 Apr 2019 19:07:19 +0200 Subject: initial commit of source fetch --- .../debian/patches/check_httpd_status/epn | 9 ++++ .../patches/check_httpd_status/htdigest_auth | 17 ++++++++ .../patches/check_httpd_status/monitoring-plugin | 49 ++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/epn create mode 100644 nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/htdigest_auth create mode 100644 nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/monitoring-plugin (limited to 'nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status') diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/epn new file mode 100644 index 0000000..661a495 --- /dev/null +++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/epn @@ -0,0 +1,9 @@ +--- a/check_httpd_status/check_httpd_status ++++ b/check_httpd_status/check_httpd_status +@@ -1,4 +1,6 @@ + #!/usr/bin/perl -w ++# nagios: -epn ++# + ####################### check_httpd_status.pl ####################### + # Version : 1.3 + # Date : 06 Aug 2010 diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/htdigest_auth b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/htdigest_auth new file mode 100644 index 0000000..336b542 --- /dev/null +++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/htdigest_auth @@ -0,0 +1,17 @@ +--- a/check_httpd_status/check_httpd_status ++++ b/check_httpd_status/check_httpd_status +@@ -213,7 +213,13 @@ + logD("Web URL : $url"); + + my $req = HTTP::Request->new( GET => $url ); +-if ( defined($o_user) ) { ++if ( defined($o_realm) ) { ++ if ( ! defined($o_port) ) { ++ $o_port = 80; ++ } ++ $ua->credentials("$o_host:$o_port", $o_realm, $o_user, $o_pass); ++} ++elsif ( defined($o_user) ) { + $req->authorization_basic($o_user, $o_pass); + } + diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/monitoring-plugin b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/monitoring-plugin new file mode 100644 index 0000000..dd8451a --- /dev/null +++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/monitoring-plugin @@ -0,0 +1,49 @@ +--- a/check_httpd_status/check_httpd_status ++++ b/check_httpd_status/check_httpd_status +@@ -34,8 +34,28 @@ + use POSIX qw(setlocale); + use Locale::gettext; + +-use Nagios::Plugin ; +- ++sub load_module { ++ my @names = @_; ++ my $module; ++ for my $name (@names) { ++ my $file = $name; ++ # requires need either a bare word or a file name ++ $file =~ s{::}{/}gsxm; ++ $file .= '.pm'; ++ eval { ++ require $file; ++ $name->import(); ++ $module = $name; ++ }; ++ last if $module; ++ } ++ return $module; ++} ++ ++my $plugin_module; ++BEGIN { ++ $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' ); ++} + use LWP::UserAgent; + use HTTP::Status; # get status_message() + use Time::HiRes qw(gettimeofday tv_interval); +@@ -92,7 +112,7 @@ + ); + + +-my $np = Nagios::Plugin->new( ++my $np = $plugin_module->new( + version => $VERSION, + blurb => _gt('Apache / Lighthttpd server status monitor for Nagios'), + usage => "Usage: %s [ -H [-p ] [-t ] [-w -c ] [-V] [-u ] [-U user -P pass -r realm]", +@@ -438,4 +458,4 @@ + Warn if less than 100 workers are available + Crit if less than 10 workers are available + EOT +-} +\ No newline at end of file ++} -- cgit v1.2.3