# HG changeset patch # User Kim Alvefur # Date 1637260123 -3600 # Node ID 883ad8b0a7c0f21e20ddda97f9e93ecc1cc886c8 # Parent 13e913471b7583ede47073510bf9620d4b086409 mod_http_admin_api: Export total storage use via mod_http_file_share Does not include size of other user data, chat logs etc. Uploads will likely be a significant fraction of total storage use. diff -r 13e913471b75 -r 883ad8b0a7c0 mod_http_admin_api/mod_http_admin_api.lua --- a/mod_http_admin_api/mod_http_admin_api.lua Thu Nov 18 19:26:07 2021 +0100 +++ b/mod_http_admin_api/mod_http_admin_api.lua Thu Nov 18 19:28:43 2021 +0100 @@ -621,6 +621,7 @@ result.memory = maybe_export_plain_gauge(families.process_resident_memory_bytes); result.cpu = maybe_export_plain_counter(families.process_cpu_seconds); result.c2s = maybe_export_summed_gauge(families["prosody_mod_c2s/connections"]) + result.uploads = maybe_export_summed_gauge(families["prosody_mod_http_file_share/total_storage_bytes"]); return json.encode(result); end diff -r 13e913471b75 -r 883ad8b0a7c0 mod_http_admin_api/openapi.yaml --- a/mod_http_admin_api/openapi.yaml Thu Nov 18 19:26:07 2021 +0100 +++ b/mod_http_admin_api/openapi.yaml Thu Nov 18 19:28:43 2021 +0100 @@ -788,6 +788,9 @@ c2s: type: integer description: Number of active c2s sessions + uploads: + type: integer + description: Disk space used by uploaded files Announcement: type: object description: An announcemen to post to users on the server