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.
This commit is contained in:
Fabian Reinartz 2016-02-17 16:34:53 +01:00
parent c24c5e6fb3
commit 825831e98f

View file

@ -265,7 +265,7 @@ func (tm *TargetManager) updateTargetGroup(tgroup *config.TargetGroup, cfg *conf
if told == nil { if told == nil {
continue continue
} }
if tnew.InstanceIdentifier() == told.InstanceIdentifier() { if tnew.fingerprint() == told.fingerprint() {
match = told match = told
oldTargets[j] = nil oldTargets[j] = nil
break break