From a8324cc8546bd08fd24916103f70518bfafb683d Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 20 Jun 2019 14:22:39 +0200 Subject: [PATCH] add 403 forbidden in error jmx --- .../centreon/common/protocols/jmx/custom/jolokia.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/centreon-plugins/centreon/common/protocols/jmx/custom/jolokia.pm b/centreon-plugins/centreon/common/protocols/jmx/custom/jolokia.pm index 2774e8c89..91a252302 100644 --- a/centreon-plugins/centreon/common/protocols/jmx/custom/jolokia.pm +++ b/centreon-plugins/centreon/common/protocols/jmx/custom/jolokia.pm @@ -177,7 +177,11 @@ sub check_error { my ($self, %options) = @_; # 500-599 an error. 400 is an attribute not present - if ($options{response}->status() >= 500 || $options{response}->status() == 401 || $options{response}->status() == 408) { + my $status = $options{response}->status(); + if ($status >= 500 || + $status == 401 || + $status == 403 || + $status == 408) { $self->{output}->add_option_msg(short_msg => "protocol issue: " . $options{response}->error_text()); $self->{output}->option_exit(); }