From 825831e98ff75529f995323a419b792cf2700be4 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Wed, 17 Feb 2016 16:34:53 +0100 Subject: [PATCH] Use fingerprint for target identity comparison So far we were using the InstanceIdentifier to compare equality of targets. This is not always accurate, for example for the blackbox exporter where the actual target is in the parameter. --- retrieval/targetmanager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retrieval/targetmanager.go b/retrieval/targetmanager.go index 7d32f83c8..55e022741 100644 --- a/retrieval/targetmanager.go +++ b/retrieval/targetmanager.go @@ -265,7 +265,7 @@ func (tm *TargetManager) updateTargetGroup(tgroup *config.TargetGroup, cfg *conf if told == nil { continue } - if tnew.InstanceIdentifier() == told.InstanceIdentifier() { + if tnew.fingerprint() == told.fingerprint() { match = told oldTargets[j] = nil break