mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 23:54:18 +02:00
fix(apps::backup::rubrik::restapi): api token not cleaned and renewed (#5344)
Co-authored-by: Sylvain Cresto <scresto@centreon.com> Refs:CTOR-729
This commit is contained in:
parent
e1b820b744
commit
95a4456d98
@ -317,6 +317,11 @@ sub request_api_paginate {
|
|||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($self->{http}->get_code() == 401) {
|
||||||
|
$self->{output}->add_option_msg(short_msg => "Request needs authentication!");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
my $decoded;
|
my $decoded;
|
||||||
eval {
|
eval {
|
||||||
$decoded = JSON::XS->new->allow_nonref(1)->utf8->decode($content);
|
$decoded = JSON::XS->new->allow_nonref(1)->utf8->decode($content);
|
||||||
@ -375,6 +380,11 @@ sub request_api {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($self->{http}->get_code() == 401) {
|
||||||
|
$self->{output}->add_option_msg(short_msg => "Authentication failed");
|
||||||
|
$self->{output}->option_exit();
|
||||||
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,6 +234,8 @@ RRDCached
|
|||||||
rsrp
|
rsrp
|
||||||
rsrq
|
rsrq
|
||||||
rssi
|
rssi
|
||||||
|
Rubrik
|
||||||
|
µs
|
||||||
Sansymphony
|
Sansymphony
|
||||||
SAS
|
SAS
|
||||||
scenarii
|
scenarii
|
||||||
@ -245,7 +247,6 @@ sinr
|
|||||||
SkyHigh
|
SkyHigh
|
||||||
SMS
|
SMS
|
||||||
SnapMirrors
|
SnapMirrors
|
||||||
SnapMirrors
|
|
||||||
snmp
|
snmp
|
||||||
snmpd.conf
|
snmpd.conf
|
||||||
space-usage-prct
|
space-usage-prct
|
||||||
@ -256,8 +257,8 @@ standAlone
|
|||||||
statefile
|
statefile
|
||||||
--statefile-concat-cwd
|
--statefile-concat-cwd
|
||||||
Stormshield
|
Stormshield
|
||||||
SureBackup
|
|
||||||
superseed
|
superseed
|
||||||
|
SureBackup
|
||||||
systemd
|
systemd
|
||||||
SysVol
|
SysVol
|
||||||
TCP
|
TCP
|
||||||
@ -282,7 +283,6 @@ UninterrupibleSleep
|
|||||||
uniq
|
uniq
|
||||||
uptime
|
uptime
|
||||||
--urlpath
|
--urlpath
|
||||||
µs
|
|
||||||
usage-prct
|
usage-prct
|
||||||
usec
|
usec
|
||||||
userpass
|
userpass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user