Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 page considered as service up #8

Open
p0n1 opened this issue Oct 27, 2023 · 0 comments
Open

404 page considered as service up #8

p0n1 opened this issue Oct 27, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@p0n1
Copy link

p0n1 commented Oct 27, 2023

I got a service down as the url can be dialed correctly but http status code as 404 and got a 404 page not found from traefik.

The current code seems to take this as service up. Should we also check HTTP status code?

func State(host models.Host) bool {
if host.Port == "" {
host.Port = "80"
}
timeout := 3 * time.Second
target := host.Addr + ":" + host.Port
conn, err := net.DialTimeout("tcp", target, timeout)
if err != nil {
return false
}
conn.Close()
return true
}

@aceberg aceberg added the enhancement New feature or request label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants