BORK BORK
Find a file
2023-01-22 18:58:05 -06:00
readme readme update 2023-01-22 18:58:05 -06:00
.gitignore * 2022-12-29 20:31:17 -08:00
go.mod re-add view alert graph link based on promql-parser 2023-01-22 18:45:19 -06:00
go.sum re-add view alert graph link based on promql-parser 2023-01-22 18:45:19 -06:00
main.go re-add view alert graph link based on promql-parser 2023-01-22 18:45:19 -06:00
README.md readme update 2023-01-22 18:58:05 -06:00

🐶 jackal

cute baby jackal stares at you with ears perked up

a humble doggy roboto

what is jackal?

jackal is a watchdog - it polls for prometheus alerts & barks in a matrix channel to alert people of alerts that are firing. Then it humbly waits 24hours in order to help prevent alert fatigue 😌

jackal can automatically modify the promql query that drives the alert into a link to a prometheus graph which cleanly shows the metric which triggered the alert:

a screenshot of jackal posting an alert in a matrix channel.  HostHighCpuLoad for paimon.cyberia.club with a very long URL link to prometheus' /graph frontend

a screenshot of a prometheus graph showing CPU usage spiking up and down during alert testing

usage

first, set up proper variables for jackal:

# use whatever user you want! can even be from different homeserver
# token can be found in element at settings -> help -> advanced -> token
# room IDs can be found under settings -> advanced -> internal room id
export JACKAL_MATRIX_URL="https://matrix.example.com"
export JACKAL_MATRIX_USER="@yourbot:example.com"
export JACKAL_MATRIX_TOKEN="yourbots-token"
export JACKAL_MATRIX_ROOM="!WAoLCYOOyceAxMaFYU:example.com"
export JACKAL_PROMETHEUS_URL="https://prometheus.example.com"

then, start the bot:

go run main.go