Browse Source

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.
pull/1402/head
Fabian Reinartz 9 years ago
parent
commit
825831e98f
  1. 2
      retrieval/targetmanager.go

2
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

Loading…
Cancel
Save