Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3690 from matrix-org/neilj/change_prometheus_mau_…
Browse files Browse the repository at this point in the history
…metric_name

combine mau metrics into one group
  • Loading branch information
neilisfragile authored Aug 15, 2018
2 parents fef2e65 + 70e48cb commit 1c5e690
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/3690.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename MAU prometheus metrics
6 changes: 3 additions & 3 deletions synapse/app/homeserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ def run_startup_checks(self, db_conn, database_engine):


# 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):
Expand Down Expand Up @@ -532,7 +532,7 @@ def generate_monthly_active_users():
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
Expand Down

0 comments on commit 1c5e690

Please sign in to comment.