From 6c97d557c11fb423354cad97c8ea3566837af8a9 Mon Sep 17 00:00:00 2001 From: CPbN Date: Thu, 21 Mar 2019 13:11:22 +0100 Subject: [PATCH] Use true given window range, not twice --- centreon-plugins/snmp_standard/mode/uptime.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/snmp_standard/mode/uptime.pm b/centreon-plugins/snmp_standard/mode/uptime.pm index 54ae66990..43db45531 100644 --- a/centreon-plugins/snmp_standard/mode/uptime.pm +++ b/centreon-plugins/snmp_standard/mode/uptime.pm @@ -80,8 +80,8 @@ sub check_overload { my $overflow = ($old_uptime + $diff_time) % 4294967296; my $division = ($old_uptime + $diff_time) / 4294967296; if ($division >= 1 && - $overflow >= ($options{timeticks} - $self->{option_results}->{reboot_window}) && - $overflow <= ($options{timeticks} + $self->{option_results}->{reboot_window})) { + $overflow >= ($options{timeticks} - ($self->{option_results}->{reboot_window} / 2)) && + $overflow <= ($options{timeticks} + ($self->{option_results}->{reboot_window} / 2))) { $self->{new_datas}->{overload}++; } else { $self->{new_datas}->{overload} = 0;