git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status
diff options
context:
space:
mode:
Diffstat (limited to 'nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status')
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/epn9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/htdigest_auth17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/monitoring-plugin49
3 files changed, 75 insertions, 0 deletions
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 <host> [-p <port>] [-t <timeout>] [-w <warn_level> -c <crit_level>] [-V] [-u <url>] [-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
++}