-
Notifications
You must be signed in to change notification settings - Fork 10
Events & Event handlers
Kuvasz is built around events and their handlers. Every check that Kuvasz makes, emits an event, and the handlers who are subscribed to them handle these events in different ways.
Has been emitted when a website passes the uptime check, i.e. it's live and "healthy". It also contains the latency of the response.
Has been emitted when a website is unreachable, an it contains the cause of the error.
Kuvasz is following redirects through HTTP calls, so when a call is forwarded to an other address, a RedirectEvent will be emitted. It contains the new location from the Location
header of the original response.
Handled events:
MonitorUpEvent
MonitorDownEvent
RedirectEvent
This handler writes a simple log message to STDOUT
and can be switched off through the ENABLE_LOG_EVENT_HANDLER
environment variable.
Examples:
Your monitor "test_up" (https://test.com) is UP (200). Latency was: 1826ms.
Your monitor "test_down" (https://test2.com) is DOWN. Reason: Connect Error: Connection refused: test2.com
Request to "test_redirected" (https://redirected.com) has been redirected
Handled events:
MonitorUpEvent
MonitorDownEvent
This handler sends email messages about the state of your monitors, and can be set up through environment variables. Same events would be suppressed, which means that two or more consecutive UP or DOWN events wouldn't result in more than one email notification.
Handled events:
MonitorUpEvent
MonitorDownEvent
This handler sends notifications through an incoming webhook to Slack about the state of your monitors, and can be set up through environment variables. Same events would be suppressed, which means that two or more consecutive UP or DOWN events wouldn't result in more than one notification. If you aren't familiar with Slack's webhooks, you can read about the initial setup here.