mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-29 16:45:04 +02:00
(plugin) database::oracle - mode dataguard use dataguard_stats view first for lag time (#3476)
This commit is contained in:
parent
b5d24ec1e1
commit
d1ea446afd
@ -158,6 +158,20 @@ sub manage_selection {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
@result = $options{sql}->fetchrow_array();
|
@result = $options{sql}->fetchrow_array();
|
||||||
|
if (!defined($result[0]) || $result[0] eq '') {
|
||||||
|
$options{sql}->query(
|
||||||
|
query => q{
|
||||||
|
SELECT
|
||||||
|
CEIL((SYSDATE - MAX(first_time)) * 24 * 60)
|
||||||
|
FROM
|
||||||
|
v$archived_log
|
||||||
|
WHERE
|
||||||
|
applied NOT IN ('NO') AND registrar = 'RFS'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
@result = $options{sql}->fetchrow_array();
|
||||||
|
}
|
||||||
|
|
||||||
$self->{global}->{lag_minutes} = defined($result[0]) && $result[0] ne '' ? $result[0] : -1;
|
$self->{global}->{lag_minutes} = defined($result[0]) && $result[0] ne '' ? $result[0] : -1;
|
||||||
|
|
||||||
$options{sql}->disconnect();
|
$options{sql}->disconnect();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user