From 6d0c24a7ce9a4efbdd495136137dcf0b084286d4 Mon Sep 17 00:00:00 2001 From: Florian Asche Date: Thu, 27 Mar 2014 13:06:42 +0100 Subject: [PATCH] Added missing Realm, without auth didnt work. --- centreon-plugins/apps/apache/serverstatus/mode/libconnect.pm | 2 +- centreon-plugins/apps/apache/serverstatus/mode/requests.pm | 5 ++++- .../apps/apache/serverstatus/mode/responsetime.pm | 5 +++++ centreon-plugins/apps/apache/serverstatus/mode/slotstates.pm | 5 +++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/apps/apache/serverstatus/mode/libconnect.pm b/centreon-plugins/apps/apache/serverstatus/mode/libconnect.pm index 5bdaa1277..7294649a2 100644 --- a/centreon-plugins/apps/apache/serverstatus/mode/libconnect.pm +++ b/centreon-plugins/apps/apache/serverstatus/mode/libconnect.pm @@ -49,7 +49,7 @@ sub connect { my $content; if (defined $self->{option_results}->{credentials}) { - $ua->credentials($self->{option_results}->{hostname}.':'.$self->{option_results}->{port},$self->{option_results}->{username},$self->{option_results}->{password}); + $ua->credentials($self->{option_results}->{hostname}.':'.$self->{option_results}->{port},$self->{option_results}->{realm},$self->{option_results}->{username},$self->{option_results}->{password}); } if ($self->{option_results}->{proto} eq "https") { diff --git a/centreon-plugins/apps/apache/serverstatus/mode/requests.pm b/centreon-plugins/apps/apache/serverstatus/mode/requests.pm index 21256d7f3..8e8ae45fa 100644 --- a/centreon-plugins/apps/apache/serverstatus/mode/requests.pm +++ b/centreon-plugins/apps/apache/serverstatus/mode/requests.pm @@ -56,6 +56,7 @@ sub new { "credentials" => { name => 'credentials' }, "username:s" => { name => 'username' }, "password:s" => { name => 'password' }, + "realm:s" => { name => 'realm', default => 'Authentification' }, "proxyurl:s" => { name => 'proxyurl' }, "warning:s" => { name => 'warning' }, "critical:s" => { name => 'critical' }, @@ -209,7 +210,9 @@ Specify username for basic authentification (Mandatory if --credentials is speci Specify password for basic authentification (Mandatory if --credentials is specidied) -=item B<--password> +=item B<--realm> + +Credentials Realm (Default: 'Authentification') =item B<--timeout> diff --git a/centreon-plugins/apps/apache/serverstatus/mode/responsetime.pm b/centreon-plugins/apps/apache/serverstatus/mode/responsetime.pm index 7f7a5827f..bc15957fe 100644 --- a/centreon-plugins/apps/apache/serverstatus/mode/responsetime.pm +++ b/centreon-plugins/apps/apache/serverstatus/mode/responsetime.pm @@ -57,6 +57,7 @@ sub new { "credentials" => { name => 'credentials' }, "username:s" => { name => 'username' }, "password:s" => { name => 'password' }, + "realm:s" => { name => 'realm', default => 'Authentification' }, "proxyurl:s" => { name => 'proxyurl' }, "warning:s" => { name => 'warning' }, "critical:s" => { name => 'critical' }, @@ -175,6 +176,10 @@ Specify username for basic authentification (Mandatory if --credentials is speci Specify password for basic authentification (Mandatory if --credentials is specidied) +=item B<--realm> + +Credentials Realm (Default: 'Authentification') + =item B<--proxyurl> Proxy URL if any diff --git a/centreon-plugins/apps/apache/serverstatus/mode/slotstates.pm b/centreon-plugins/apps/apache/serverstatus/mode/slotstates.pm index 1bb81396b..2cf877084 100644 --- a/centreon-plugins/apps/apache/serverstatus/mode/slotstates.pm +++ b/centreon-plugins/apps/apache/serverstatus/mode/slotstates.pm @@ -56,6 +56,7 @@ sub new { "credentials" => { name => 'credentials' }, "username:s" => { name => 'username' }, "password:s" => { name => 'password' }, + "realm:s" => { name => 'realm', default => 'Authentification' }, "proxyurl:s" => { name => 'proxyurl' }, "warning:s" => { name => 'warning' }, "critical:s" => { name => 'critical' }, @@ -202,6 +203,10 @@ Specify username for basic authentification (Mandatory if --credentials is speci Specify password for basic authentification (Mandatory if --credentials is specidied) +=item B<--realm> + +Credentials Realm (Default: 'Authentification') + =item B<--timeout> Threshold for HTTP timeout