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.
--- 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
--- 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