mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(monitoring): gatus, grafana alerting to discord
This commit is contained in:
parent
cee397d774
commit
79ba879e6d
8 changed files with 769 additions and 0 deletions
26
nixos/monitoring/grafana-alerting.nix
Normal file
26
nixos/monitoring/grafana-alerting.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, ... }: {
|
||||
sops.secrets.grafana_discord_webhook_url = {
|
||||
sopsFile = ../secrets/grafana.yaml;
|
||||
owner = "grafana";
|
||||
};
|
||||
services.grafana.provision.alerting.contactPoints.settings = {
|
||||
apiVersion = 1;
|
||||
contactPoints = [
|
||||
{
|
||||
orgId = 1;
|
||||
name = "Discord";
|
||||
receivers = [
|
||||
{
|
||||
uid = "discord_alerting";
|
||||
type = "discord";
|
||||
disableResolveMessage = false;
|
||||
settings = {
|
||||
url = "$__file{${config.sops.secrets.grafana_discord_webhook_url.path}}";
|
||||
#avatar_url = "";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue