Compare commits
No commits in common. "90925b6f84923d0eb98c6ead98eeab2c1c737cc7" and "d51b6dc8e8df466101ba43d998ede368cf3c2606" have entirely different histories.
90925b6f84
...
d51b6dc8e8
2 changed files with 4 additions and 18 deletions
|
@ -1,7 +1,3 @@
|
||||||
# 0.4.0 / 2024-04-15
|
|
||||||
|
|
||||||
* Improve logging for up/down changes
|
|
||||||
|
|
||||||
# 0.3.0 / 2024-04-15
|
# 0.3.0 / 2024-04-15
|
||||||
|
|
||||||
* Add support for hostnames in addresses
|
* Add support for hostnames in addresses
|
||||||
|
|
|
@ -76,24 +76,14 @@ func (m Monitor) updateRoutingTargets(checker healthcheck.Checker) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := checker.Check(m.svc.HealthCheck.Settings, t); err != nil {
|
if err := checker.Check(m.svc.HealthCheck.Settings, t); err != nil {
|
||||||
if m.ipt.UnregisterServiceTarget(m.svc.Name, tgt) {
|
logger.WithError(err).Debug("detected target down")
|
||||||
logger.WithError(err).Warn("detected target down")
|
changed = changed || m.ipt.UnregisterServiceTarget(m.svc.Name, tgt)
|
||||||
changed = true
|
|
||||||
} else {
|
|
||||||
logger.WithError(err).Debug("detected target down")
|
|
||||||
}
|
|
||||||
|
|
||||||
down = append(down, t.String())
|
down = append(down, t.String())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if m.ipt.RegisterServiceTarget(m.svc.Name, tgt) {
|
logger.Debug("target up")
|
||||||
logger.Info("target up")
|
changed = changed || m.ipt.RegisterServiceTarget(m.svc.Name, tgt)
|
||||||
changed = true
|
|
||||||
} else {
|
|
||||||
logger.Debug("target up")
|
|
||||||
}
|
|
||||||
|
|
||||||
up = append(up, t.String())
|
up = append(up, t.String())
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue