Software /
code /
prosody-modules
Changeset
5886:9f2816287556
mod_http_admin_api: Include active user counts in metrics response
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 12 Mar 2024 10:41:55 +0000 |
parents | 5885:c20a0c8a54ea |
children | 5887:ca62f9984f4b |
files | mod_http_admin_api/mod_http_admin_api.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_admin_api/mod_http_admin_api.lua Sat Mar 09 21:05:00 2024 +0100 +++ b/mod_http_admin_api/mod_http_admin_api.lua Tue Mar 12 10:41:55 2024 +0000 @@ -762,6 +762,11 @@ 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"]); + result.users = { + active_1d = maybe_export_plain_gauge(families["prosody_mod_measure_active_users/active_users_1d"]); + active_7d = maybe_export_plain_gauge(families["prosody_mod_measure_active_users/active_users_7d"]); + active_30d = maybe_export_plain_gauge(families["prosody_mod_measure_active_users/active_users_30d"]); + }; return json.encode(result); end