diff --git a/centreon/common/protocols/jmx/custom/jolokia.pm b/centreon/common/protocols/jmx/custom/jolokia.pm index 46d1a5398..9667328f5 100644 --- a/centreon/common/protocols/jmx/custom/jolokia.pm +++ b/centreon/common/protocols/jmx/custom/jolokia.pm @@ -203,7 +203,7 @@ sub get_attributes { $j < scalar(@{$options{request}->[$i]->{attributes}}); $j++, $pos++) { if ($responses[$pos]->is_error()) { # 500-599 an error. 400 is an attribute not present - if ($responses[$pos]->status() >= 500) { + if ($responses[$pos]->status() >= 500 || $responses[$pos]->status() == 401) { $self->{output}->add_option_msg(short_msg => "protocol issue: " . $responses[$pos]->error_text()); $self->{output}->option_exit(); }