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

check/http: a single error results in down status #161

Open
parkr opened this issue Feb 23, 2025 · 1 comment
Open

check/http: a single error results in down status #161

parkr opened this issue Feb 23, 2025 · 1 comment

Comments

@parkr
Copy link
Contributor

parkr commented Feb 23, 2025

I added a Pushover notifier to my checks recently and noticed just how flaky they are. By default I have a check which makes 5 attempts. If just one of the attempts fails (e.g. TLS handshake timeout) then boom the whole site is marked down, even if the other 4 work fine.

Would it be possible to consider a configuration option of allowed failed attempts?

Here's the code which configures at-least-one-error-means-down:

checkup/check/http/http.go

Lines 151 to 157 in cdc8b78

// Check errors (down)
for i := range result.Times {
if result.Times[i].Error != "" {
result.Down = true
return result
}
}

@parkr
Copy link
Contributor Author

parkr commented Feb 23, 2025

The Result in question:

{
  "title":"byparker.com",
  "endpoint":"https://byparker.com",
  "timestamp":1740331804280650069,
  "times":[
    {"rtt":5019109349,"error":"Get \"https://byparker.com\": net/http: TLS handshake timeout"},
    {"rtt":149080050},
    {"rtt":57264705},
    {"rtt":30989184},
    {"rtt":24505730}
  ],
  "threshold":400000000,
  "down":true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant