-
Notifications
You must be signed in to change notification settings - Fork 10
Monitor management
Your monitors are your base entities when it comes to the management of Kuvasz. They encapsulate all of the necessary informations that are needed to run any kind of checks against a website.
You can:
- create,
- update, or
- delete
a monitor.
While it is possible to manipulate your monitors directly in the database (followed by restarting the service), this approach is discouraged, because it doesn't guarantee the consistency of your data. Instead, you should use the API of Kuvasz to do these things.
There are dedicated endpoints for:
- creation ->
POST /monitor
- update ->
PATCH /monitor/{id}
- deletion ->
DELETE /monitor/{id}
The uptimeCheckInterval
property on the API represents the interval between two consecutive uptime check in seconds. The shortest interval you can set is 60 seconds.
If you want to permanently remove a monitor and all of its historical data, you should go with the DELETE
endpoint mentioned above. However, if you just want to temporarily disable a monitor, you can use the PATCH
endpoint with the following payload:
{
"enabled": false
}
Through the provided PATCH
endpoint you can make partial updates to a monitor, which means that you don't have to specify the value of a property if you don't want to touch it at all.
Example (Updating only the uptimeCheckInterval of a monitor):
curl --location --request PATCH 'https://your.host:8080/monitor/4' \
--header 'Authorization: Bearer YourAccesstoken' \
--header 'Content-Type: application/json' \
--data-raw '{
"uptimeCheckInterval": 120
}'