From 1527df505623318d213dcec7b794969c4f7b241e Mon Sep 17 00:00:00 2001 From: Yafei Bao Date: Wed, 31 Jul 2019 09:13:52 +0800 Subject: [PATCH] treate EXIT as DISABLE for metrics --- lib/exabgp/application/healthcheck.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/exabgp/application/healthcheck.py b/lib/exabgp/application/healthcheck.py index a11151c48..a4462f2bd 100644 --- a/lib/exabgp/application/healthcheck.py +++ b/lib/exabgp/application/healthcheck.py @@ -465,7 +465,8 @@ def exabgp(target): setup_ips(options.ips, options.label, options.sudo) logger.info("send announces for %s state to ExaBGP", target) - metric = vars(options).get("{0}_metric".format(str(target).lower()), 0) + default_metric = vars(options).get("{0}_metric".format(str(states.DISABLED).lower())) + metric = vars(options).get("{0}_metric".format(str(target).lower()), default_metric) for ip in options.ips: if options.withdraw_on_down: command = "announce" if target is states.UP else "withdraw"