diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2024-06-20 05:40:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 02:40:25 +0000 |
commit | 29bd8abd3f1eecfbdf1bd2f8be18665d5fb4bdde (patch) | |
tree | 4e56d8d7a0bb40fad64dfff8ceed22aa7b62803a /src | |
parent | b96ec90b4d723ff2ec5113524716a42426fb1856 (diff) |
Fix space percentage calculation in dbengine retention chart (#17963)
Fix space percentage calculation
Diffstat (limited to 'src')
-rw-r--r-- | src/database/engine/rrdengine.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/database/engine/rrdengine.c b/src/database/engine/rrdengine.c index e68412f010..2d6583ead5 100644 --- a/src/database/engine/rrdengine.c +++ b/src/database/engine/rrdengine.c @@ -1861,9 +1861,11 @@ void dbengine_retention_statistics(void) uint64_t disk_space = get_used_disk_space(multidb_ctx[tier]); //uint64_t disk_space = storage_engine_disk_space_used(eng->seb, localhost->db[tier].si); - uint64_t config_disk_space = multidb_ctx[tier]->config.max_disk_space; - if (!config_disk_space) + uint64_t config_disk_space = storage_engine_disk_space_max(eng->seb, localhost->db[tier].si); + if (!config_disk_space) { config_disk_space = get_directory_free_bytes_space(multidb_ctx[tier]); + config_disk_space += disk_space; + } collected_number disk_percentage = (collected_number) (config_disk_space ? 100 * disk_space / config_disk_space : 0); |