From e7d091fb867ade42889af7b8f9ce6a94a3d5e85e Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Tue, 14 Aug 2018 16:26:55 +0100 Subject: combine mau metrics into one group --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'synapse/app') diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 37a9b126a5..f13584e190 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -303,9 +303,8 @@ class SynapseHomeServer(HomeServer): # Gauges to expose monthly active user control metrics -current_mau_gauge = Gauge("synapse_admin_current_mau", "Current MAU") -max_mau_value_gauge = Gauge("synapse_admin_max_mau_value", "MAU Limit") - +current_mau_gauge = Gauge("synapse_admin_mau:current", "Current MAU") +max_mau_gauge = Gauge("synapse_admin_mau:max", "MAU Limit") def setup(config_options): """ @@ -532,7 +531,7 @@ def run(hs): if hs.config.limit_usage_by_mau: count = yield hs.get_datastore().get_monthly_active_count() current_mau_gauge.set(float(count)) - max_mau_value_gauge.set(float(hs.config.max_mau_value)) + max_mau_gauge.set(float(hs.config.max_mau_value)) hs.get_datastore().initialise_reserved_users( hs.config.mau_limits_reserved_threepids -- cgit 1.4.1 From e5962f845c2e93564a2855696e0776bd05c5f126 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Tue, 14 Aug 2018 16:36:14 +0100 Subject: pep8 --- synapse/app/homeserver.py | 1 + 1 file changed, 1 insertion(+) (limited to 'synapse/app') diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index f13584e190..a98bb506e5 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -306,6 +306,7 @@ class SynapseHomeServer(HomeServer): current_mau_gauge = Gauge("synapse_admin_mau:current", "Current MAU") max_mau_gauge = Gauge("synapse_admin_mau:max", "MAU Limit") + def setup(config_options): """ Args: -- cgit 1.4.1