summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2015-03-12 16:05:46 +0000
committerPaul "LeoNerd" Evans <paul@matrix.org>2015-03-12 16:24:51 +0000
commitb98b4c135d9738d5cf701712fc244209651cddf7 (patch)
tree56f242ffc89722a96c1f89f18525c5d1966cef0b /synapse/config
parentFold the slightly-odd bind_port/secure_port/etc.. logic into SynapseHomeServe... (diff)
downloadsynapse-b98b4c135d9738d5cf701712fc244209651cddf7.tar.xz
Option to serve metrics from their own localhost-only TCP port instead of muxed on the main listener
Diffstat (limited to '')
-rw-r--r--synapse/config/metrics.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/config/metrics.py b/synapse/config/metrics.py
index 90aba10bba..901a429c76 100644
--- a/synapse/config/metrics.py
+++ b/synapse/config/metrics.py
@@ -20,6 +20,7 @@ class MetricsConfig(Config):
     def __init__(self, args):
         super(MetricsConfig, self).__init__(args)
         self.enable_metrics = args.enable_metrics
+        self.metrics_port = args.metrics_port
 
     @classmethod
     def add_arguments(cls, parser):
@@ -29,3 +30,7 @@ class MetricsConfig(Config):
             '--enable-metrics', dest="enable_metrics", action="store_true",
             help="Enable collection and rendering of performance metrics"
         )
+        metrics_group.add_argument(
+            '--metrics-port', metavar="PORT", type=int,
+            help="Separate port to accept metrics requests on (on localhost)"
+        )