mirror of
https://github.com/mtan93/cachet-url-monitor.git
synced 2026-03-08 05:31:58 +00:00
#38 - Adding support to milliseconds and different units for latency and changing http status to a range, instead of a single value.
This commit is contained in:
@@ -23,7 +23,7 @@ endpoint:
|
||||
timeout: 1 # seconds
|
||||
expectation:
|
||||
- type: HTTP_STATUS
|
||||
status: 200
|
||||
status_range: 200-300
|
||||
- type: LATENCY
|
||||
threshold: 1
|
||||
- type: REGEX
|
||||
@@ -38,6 +38,7 @@ cachet:
|
||||
- UPDATE_STATUS
|
||||
public_incidents: true
|
||||
frequency: 30
|
||||
latency_unit: ms
|
||||
```
|
||||
|
||||
- **endpoint**, the configuration about the URL that will be monitored.
|
||||
@@ -45,7 +46,7 @@ frequency: 30
|
||||
- **method**, the HTTP method that will be used by the monitor.
|
||||
- **timeout**, how long we'll wait to consider the request failed. The unit of it is seconds.
|
||||
- **expectation**, the list of expectations set for the URL.
|
||||
- **HTTP_STATUS**, we will verify if the response status code matches what we expect.
|
||||
- **HTTP_STATUS**, we will verify if the response status code falls into the expected range. Please keep in mind the range is inclusive on the first number and exclusive on the second number. If just one value is specified, it will default to only the given value, for example `200` will be converted to `200-201`.
|
||||
- **LATENCY**, we measure how long the request took to get a response and fail if it's above the threshold. The unit is in seconds.
|
||||
- **REGEX**, we verify if the response body matches the given regex.
|
||||
- **cachet**, this is the settings for our cachet server.
|
||||
@@ -58,6 +59,7 @@ frequency: 30
|
||||
- **UPDATE_STATUS**, updates the component status
|
||||
- **public_incidents**, boolean to decide if created incidents should be visible to everyone or only to logged in users. Important only if `CREATE_INCIDENT` or `UPDATE_STATUS` are set.
|
||||
- **frequency**, how often we'll send a request to the given URL. The unit is in seconds.
|
||||
- **latency_unit**, the latency unit used when reporting the metrics. It will automatically convert to the specified unit. It's not mandatory and it will default to **seconds**. Available units: `ms`, `s`, `m`, `h`.
|
||||
|
||||
## Setting up
|
||||
|
||||
|
||||
Reference in New Issue
Block a user