Do not log running out of disk space when the disk occupation is > 100%. We are seeing this with docker deployments on macOS hosts. It is a band-aid fix, however, it also seem to be the only thing we can do given that docker didn't fix this in nearly two years now.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2023-05-07 22:11:35 +02:00
parent f8dbd2bae6
commit 51ca8f369b
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 2 additions and 2 deletions

View File

@ -86,9 +86,9 @@ static int check_space(const char *file, int LastUsage)
// exceeds the configured threshold and current usage is higher than
// usage in the last run (to prevent log spam)
perc = get_filepath_usage(file, buffer);
if(perc > config.check.disk && perc > LastUsage )
if(perc > config.check.disk && perc > LastUsage && perc <= 100.0)
log_resource_shortage(-1.0, 0, -1, perc, file, buffer);
return perc;
}