From 898c7330f2342c74117ab5c6392717c7ebc4f94b Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Mon, 2 Mar 2026 16:20:17 +0000 Subject: [PATCH] reporting file system from bind vol and not inside docker --- app/web/utils/metrics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/web/utils/metrics.py b/app/web/utils/metrics.py index 55f17e8..1a4895d 100644 --- a/app/web/utils/metrics.py +++ b/app/web/utils/metrics.py @@ -57,7 +57,9 @@ async def redis_subscribe_worker_exceptions(redis_exceptions_channel: str): async def measure_regular_metrics(sqlite_db_url: str, repeat_in_seconds: int): - _total, used, free = shutil.disk_usage("/") + # Use a bind-mounted path to measure the host filesystem, + # not the container's overlay filesystem + _total, used, free = shutil.disk_usage("/aa-api/database") DISK_UTILIZATION.labels(type="used").set(used / (2**30)) DISK_UTILIZATION.labels(type="free").set(free / (2**30)) try: