Option to serve metrics from their own localhost-only TCP port instead of muxed on the main listener

This commit is contained in:
Paul "LeoNerd" Evans 2015-03-12 16:05:46 +00:00
parent a2cdd11d4a
commit b98b4c135d
2 changed files with 15 additions and 2 deletions

View file

@ -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)"
)