fix docker health checker metrics missing from prometheus

This commit is contained in:
yusing
2024-12-19 14:01:55 +08:00
parent 84675b5c0f
commit 751594860a
3 changed files with 4 additions and 3 deletions

View File

@@ -14,12 +14,13 @@ type DockerHealthMonitor struct {
fallback health.HealthChecker
}
func NewDockerHealthMonitor(client *docker.SharedClient, containerID string, config *health.HealthCheckConfig, fallback health.HealthChecker) *DockerHealthMonitor {
func NewDockerHealthMonitor(client *docker.SharedClient, containerID, alias string, config *health.HealthCheckConfig, fallback health.HealthChecker) *DockerHealthMonitor {
mon := new(DockerHealthMonitor)
mon.client = client
mon.containerID = containerID
mon.monitor = newMonitor(fallback.URL(), config, mon.CheckHealth)
mon.fallback = fallback
mon.service = alias
return mon
}