mirror of https://github.com/mikaku/Monitorix.git
Merge pull request #355 from bachandi/fix_du_refresh_interval
Fix du refresh interval setting for values that are not multiples of 60.
This commit is contained in:
commit
25de78d2bd
|
@ -170,11 +170,11 @@ sub du_update {
|
|||
my $rrdata = "N";
|
||||
|
||||
my $refresh_interval = ($config->{du}->{refresh_interval} || 0);
|
||||
if($refresh_interval > 0) {
|
||||
if($refresh_interval > 60) {
|
||||
# If desired refreshed only every refresh_interval seconds.
|
||||
# This logic will refresh atleast once a day.
|
||||
my (undef, $min, $hour) = localtime(time);
|
||||
return if(60 * ($min + 60 * $hour) % $refresh_interval);
|
||||
return if(($min + 60 * $hour) % int($refresh_interval / 60));
|
||||
}
|
||||
|
||||
my $e = 0;
|
||||
|
|
Loading…
Reference in New Issue