diff --git a/elastalert/elastalert.py b/elastalert/elastalert.py index c7509a7c..dc910c6b 100755 --- a/elastalert/elastalert.py +++ b/elastalert/elastalert.py @@ -2079,7 +2079,7 @@ def main(args=None): if not args: args = sys.argv[1:] client = ElastAlerter(args) - + if client.prometheus_port and not client.debug: p = PrometheusWrapper(client) p.start() diff --git a/elastalert/prometheus_wrapper.py b/elastalert/prometheus_wrapper.py index b3d0758b..d94a3520 100644 --- a/elastalert/prometheus_wrapper.py +++ b/elastalert/prometheus_wrapper.py @@ -52,4 +52,4 @@ def metrics_writeback(self, doc_type, body): elif doc_type == 'silence': self.prom_alerts_silenced.labels(body['rule_name']).inc() finally: - return res \ No newline at end of file + return res