Mercurial > prosody-modules
diff mod_http_admin_api/mod_http_admin_api.lua @ 4777:883ad8b0a7c0
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Nov 2021 19:28:43 +0100 |
parents | 13e913471b75 |
children | 55e3ca6bdfd1 |
line wrap: on
line diff
--- 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