Mercurial > prosody-modules
comparison 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 |
comparison
equal
deleted
inserted
replaced
4776:13e913471b75 | 4777:883ad8b0a7c0 |
---|---|
619 end | 619 end |
620 local families = statsmanager.get_metric_registry():get_metric_families(); | 620 local families = statsmanager.get_metric_registry():get_metric_families(); |
621 result.memory = maybe_export_plain_gauge(families.process_resident_memory_bytes); | 621 result.memory = maybe_export_plain_gauge(families.process_resident_memory_bytes); |
622 result.cpu = maybe_export_plain_counter(families.process_cpu_seconds); | 622 result.cpu = maybe_export_plain_counter(families.process_cpu_seconds); |
623 result.c2s = maybe_export_summed_gauge(families["prosody_mod_c2s/connections"]) | 623 result.c2s = maybe_export_summed_gauge(families["prosody_mod_c2s/connections"]) |
624 result.uploads = maybe_export_summed_gauge(families["prosody_mod_http_file_share/total_storage_bytes"]); | |
624 return json.encode(result); | 625 return json.encode(result); |
625 end | 626 end |
626 | 627 |
627 local function post_server_announcement(event) | 628 local function post_server_announcement(event) |
628 local request = event.request; | 629 local request = event.request; |