openstatusHQ / openstatus

🏓 The open-source synthetic monitoring platform 🏓
https://openstatus.dev
GNU Affero General Public License v3.0
6.15k stars 393 forks source link

Create thresholds response time limits for 'degraded' and 'failed' #837

Open mxkaske opened 4 months ago

mxkaske commented 4 months ago

Allow the user to select the response time limits for when a monitor is degraded and failed.

Add two new db columns for monitor:

Both should be a number that the user selects (can be via select or input). We should have a max allowed number, e.g. 45sec (45.000ms).

Right now, we have the export const monitorStatus = ["active", "error"] as const; that is used within the monitor_status and monitor schema.

We could extend it with "degraded" to include that information within a specific monitor or within a specific monitor_status (based on the region).

Within a monitor overview, extend the cards:

Image

[!IMPORTANT]
Right now, the displayed data is coming from Tinybird. How to calculate the 'degraded' values?

How to calculate the 'degraded' value? Multiple options:

  1. extend our ping_response tb schema with a 'status' column and count the amount of different status (which will then be fixed as it will then be hardcoded in)
  2. within our metrics_endpoints, pass the limit props and calculate/count the amount based on the props (dynamic, as the user could change the threshold and we will calculate them differently)

Image

I like the second option as it is dynamic - and we don't have to extend the schema.

Open questions:

nolostra commented 1 month ago

can i get it assigned to me or only CORE TEAM is allowed to work on it ?