sourcegraph / checkup

Distributed, lock-free, self-hosted health checks and status pages
https://sourcegraph.github.io/checkup
MIT License
3.41k stars 246 forks source link

Remove check from list #87

Open davideapvd opened 5 years ago

davideapvd commented 5 years ago

Hello, is there a way to remove a check from the checkup.json list and so removing any eventual service disruption message?

emcniece commented 5 years ago

Doesn't look like it. The status will eventually disappear as more checks are made, but yes having the disruption message present for that time is disconcerting.

I wonder if we could add an exemption list to the statuspage's config.js to exclude a domain?

For example (config_template.js):

checkup.config = {
  "exclude": [
    "excluded-site1.com",
    "excluded-site2.com",
    // ...
  ],
  "timeframe": 1 * time.Day,
  // ...
}

Exclusion must be by endpoint (domain name) as that is what is used for the unique ID of charts.

The actual exclusion behaviour could be handled in a few ways: the chart could be removed and the data ignored entirely, or the chart could be rendered but the alerting exempt from the status reporting.

What do you think - if a check is "excluded", should the chart be visible (and maybe disabled somehow), or should it be entirely absent?

It should be noted that this will not get rid of the actual notification that happens in the ./checkup binary, this only affects the status page.

emcniece commented 5 years ago

Another option might be to let the checkup.json act as a source of truth to inform the UI:

"checkers": [
    {
      "type": "http",
      "endpoint_name": "My site",
      "endpoint_url": "https://my-site.com",
      "disabled": true        // <- new param
    }
  ],

This disabled boolean could be included in the generated check JSON, and the status page could exclude these checks from the overall status. This might also allow the checkup binary to be aware of the exclusion and not perform the check while keeping a placeholder for the chart.