feat(dgn-notify): use nfty-sh to push notification
All checks were successful
Check meta / check_dns (pull_request) Successful in 17s
Check meta / check_meta (pull_request) Successful in 17s
Check workflows / check_workflows (pull_request) Successful in 19s
Run pre-commit on all files / pre-commit (push) Successful in 31s
Run pre-commit on all files / pre-commit (pull_request) Successful in 31s
Build all the nodes / ap01 (pull_request) Successful in 42s
Build all the nodes / netaccess01 (pull_request) Successful in 24s
Build all the nodes / netcore00 (pull_request) Successful in 23s
Build all the nodes / bridge01 (pull_request) Successful in 56s
Build all the nodes / geo01 (pull_request) Successful in 1m1s
Build all the nodes / cof02 (pull_request) Successful in 1m2s
Build all the nodes / hypervisor03 (pull_request) Successful in 1m3s
Build all the nodes / netcore01 (pull_request) Successful in 23s
Build all the nodes / netcore02 (pull_request) Successful in 23s
Build all the nodes / hypervisor02 (pull_request) Successful in 1m6s
Build all the nodes / hypervisor01 (pull_request) Successful in 1m7s
Build all the nodes / geo02 (pull_request) Successful in 1m7s
Build all the nodes / iso (pull_request) Successful in 1m7s
Build all the nodes / build01 (pull_request) Successful in 1m10s
Build all the nodes / lab-router01 (pull_request) Successful in 56s
Build all the nodes / compute01 (pull_request) Successful in 1m21s
Build the shell / build-shell (pull_request) Successful in 24s
Build all the nodes / krz01 (pull_request) Successful in 1m36s
Build all the nodes / tower01 (pull_request) Successful in 48s
Build all the nodes / web02 (pull_request) Successful in 51s
Build all the nodes / rescue01 (pull_request) Successful in 1m1s
Build all the nodes / web03 (pull_request) Successful in 54s
Build all the nodes / vault01 (pull_request) Successful in 1m5s
Build all the nodes / web01 (pull_request) Successful in 1m8s
Build all the nodes / storage01 (pull_request) Successful in 1m35s
All checks were successful
Check meta / check_dns (pull_request) Successful in 17s
Check meta / check_meta (pull_request) Successful in 17s
Check workflows / check_workflows (pull_request) Successful in 19s
Run pre-commit on all files / pre-commit (push) Successful in 31s
Run pre-commit on all files / pre-commit (pull_request) Successful in 31s
Build all the nodes / ap01 (pull_request) Successful in 42s
Build all the nodes / netaccess01 (pull_request) Successful in 24s
Build all the nodes / netcore00 (pull_request) Successful in 23s
Build all the nodes / bridge01 (pull_request) Successful in 56s
Build all the nodes / geo01 (pull_request) Successful in 1m1s
Build all the nodes / cof02 (pull_request) Successful in 1m2s
Build all the nodes / hypervisor03 (pull_request) Successful in 1m3s
Build all the nodes / netcore01 (pull_request) Successful in 23s
Build all the nodes / netcore02 (pull_request) Successful in 23s
Build all the nodes / hypervisor02 (pull_request) Successful in 1m6s
Build all the nodes / hypervisor01 (pull_request) Successful in 1m7s
Build all the nodes / geo02 (pull_request) Successful in 1m7s
Build all the nodes / iso (pull_request) Successful in 1m7s
Build all the nodes / build01 (pull_request) Successful in 1m10s
Build all the nodes / lab-router01 (pull_request) Successful in 56s
Build all the nodes / compute01 (pull_request) Successful in 1m21s
Build the shell / build-shell (pull_request) Successful in 24s
Build all the nodes / krz01 (pull_request) Successful in 1m36s
Build all the nodes / tower01 (pull_request) Successful in 48s
Build all the nodes / web02 (pull_request) Successful in 51s
Build all the nodes / rescue01 (pull_request) Successful in 1m1s
Build all the nodes / web03 (pull_request) Successful in 54s
Build all the nodes / vault01 (pull_request) Successful in 1m5s
Build all the nodes / web01 (pull_request) Successful in 1m8s
Build all the nodes / storage01 (pull_request) Successful in 1m35s
This commit is contained in:
parent
51ec9b8764
commit
cba0b7a4cc
5 changed files with 75 additions and 2 deletions
2
REUSE.toml
generated
2
REUSE.toml
generated
|
@ -14,7 +14,7 @@ precedence = "closest"
|
|||
[[annotations]]
|
||||
SPDX-FileCopyrightText = "La Délégation Générale Numérique <contact@dgnum.eu>"
|
||||
SPDX-License-Identifier = "CC-BY-NC-ND-4.0"
|
||||
path = ["machines/**/secrets/*", "modules/nixos/dgn-backups/keys/*", "modules/nixos/dgn-netbox-agent/secrets/netbox-agent", "modules/nixos/dgn-notify/mail", "modules/nixos/dgn-forgejo-runners/forgejo_runners-token_file", "modules/nixos/dgn-records/__arkheon-token_file", "modules/nixos/dgn-s3/garage-*_file"]
|
||||
path = ["machines/**/secrets/*", "modules/nixos/dgn-backups/keys/*", "modules/nixos/dgn-netbox-agent/secrets/netbox-agent", "modules/nixos/dgn-notify/mail", "modules/nixos/dgn-notify/ntfy", "modules/nixos/dgn-forgejo-runners/forgejo_runners-token_file", "modules/nixos/dgn-records/__arkheon-token_file", "modules/nixos/dgn-s3/garage-*_file"]
|
||||
precedence = "closest"
|
||||
|
||||
[[annotations]]
|
||||
|
|
|
@ -92,6 +92,7 @@ let
|
|||
"modules/nixos/dgn-backups/keys/*"
|
||||
"modules/nixos/dgn-netbox-agent/secrets/netbox-agent"
|
||||
"modules/nixos/dgn-notify/mail"
|
||||
"modules/nixos/dgn-notify/ntfy"
|
||||
"modules/nixos/dgn-forgejo-runners/forgejo_runners-token_file"
|
||||
"modules/nixos/dgn-records/__arkheon-token_file"
|
||||
"modules/nixos/dgn-s3/garage-*_file"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
let
|
||||
inherit (lib)
|
||||
concatMapStringsSep
|
||||
getExe
|
||||
mkEnableOption
|
||||
mkForce
|
||||
mkIf
|
||||
|
@ -63,6 +64,14 @@ in
|
|||
|
||||
$(systemctl status --full "$1")
|
||||
ERRMAIL
|
||||
|
||||
${getExe pkgs.jq} \
|
||||
'.title |= $title | .message |= $body' \
|
||||
<(echo '{ topic: "monitoring", priority: 4 }') \
|
||||
--arg title "[$HOSTNAME] Systemd failure: $1" \
|
||||
--rawfile body <(systemctl status --full "$1") | \
|
||||
${getExe pkgs.curl} https://push.dgnum.eu -d @- \
|
||||
-H "Authorization: Bearer $(cat ${config.age.secrets.ntfy.path})"
|
||||
''
|
||||
);
|
||||
};
|
||||
|
|
60
modules/nixos/dgn-notify/ntfy
Normal file
60
modules/nixos/dgn-notify/ntfy
Normal file
|
@ -0,0 +1,60 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 jIXfPA fliq4UcU2T15wd/CEB5NYk9+0cNpA8higneZUX9uY2I
|
||||
ui9Ii+fWdvyAjeireGBE1EiHhpuh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bC2C7i3g
|
||||
5KVwYkZp3XkCprFHhKJu+WUAgAKrFpga6BOwMS218w4
|
||||
-> ssh-ed25519 DqHxWQ mzemsdxZ9mmQUHb3K0CCN4nbgaWWC/XfMFclVf5VH3k
|
||||
H4zzq3ra6WAupZh1WTvdxqu5U9MaKdHQZ26fqUwHXTs
|
||||
-> ssh-ed25519 IxxZqA UKjyIDwJSWOG6M9jNvQOL+fDEpnTuIpCVUaLe1o7YWg
|
||||
DHBp7hyl9ViLeM4EKIrqGTtO/jrBofBA1qkog1OnSfY
|
||||
-> ssh-ed25519 /fsvPA QIkPRMMVzTkX5GEsFxSnNGeICn7gCguPHVK1FLlbFU8
|
||||
YK+pz/tmNYV1XRU5JC1dDIOonq5D86J9X3hmJgJTlcg
|
||||
-> ssh-ed25519 tDqJRg I4b5qLm6/c7kZD14FFgv/Y1lpAnMl+hSAurzNcjRHmA
|
||||
Q6A+6M9I1atpMyaE+rIXt68Xco9sCX1lySDnNmwxnpw
|
||||
-> ssh-ed25519 9pVK7Q sBP87Q+34Pgx2/uIOcvcu3Amf78Clj9BZfQ4FhjVAEg
|
||||
7TMI1cmEBJm1uDoXlE18lPmOAV+cJKuXtNnRxWOmf4Y
|
||||
-> ssh-ed25519 /BRpBQ bGI32xEyyM1hJ4pQV1VOgjJYkOu5HIzNGpBgZJGPLic
|
||||
CmJf02BnchNgyy5uUEPO4GLn+XZ08PuVyrBqKir5/Xg
|
||||
-> ssh-ed25519 t0vvHQ RpEDX65fLny4bm2vUvvV8cSvFS5vRCL3LyZVBw392j8
|
||||
NWQd/7kUHKEi919cOOOYHGGn9FdoyKMOhHjBu84/Z4A
|
||||
-> ssh-ed25519 E6cGqw ItjYI/zA8VklrSAsp+X4CkVGj/wBf6Bga722fwKEoCU
|
||||
+DXH2k8vW+xdJwg+VEaC3re9ikAwGcIzc00a1OpW0MA
|
||||
-> ssh-ed25519 EEPmeQ xeSzsHR8qA+qwFhQP83S3ANg484KbkppW+51fpP05VE
|
||||
oC5xLk0nstn0zzT8jAfC+fZc7FLIR43QjEGxBHXy7eM
|
||||
-> ssh-ed25519 /x+F2Q 7YNTNvaZsXhQVz70ZLNrTthtLByqyTmz0i4jMtdasR4
|
||||
6lCNttcesatKVzFBAI8BCHU1KKE01vJVAiSMhkg+M2U
|
||||
-> ssh-ed25519 +MNHsw K++mpX4PIlHN4om/zVJXmmMd+oV7GZEXO4FVT5vT2AQ
|
||||
YEU316rCwxr+XS0TU2k9PurHF05S36rXJkaaLMqxW38
|
||||
-> ssh-ed25519 rHotTw VeSoOZpNUWekWyzY8cQdrggg5CQffYZMwdenHoCETE0
|
||||
dWTaT+PUd/U93VDaIwck/mo0hMYaV+S7H5EE8vL+nUo
|
||||
-> ssh-ed25519 NaIdrw AEvxg0Ef0mcakpx+FY6MyniVHrseG6XLWCkU4JYeXn0
|
||||
iSRU4r/LdQppgn9VCUQ9WZoyVGHI81AcaAz6oTCl3v8
|
||||
-> ssh-ed25519 +mFdtQ keWGRyoODhSW0cSazXshktZAIP5NUOpKJ2kwVu4ffic
|
||||
mm1aPpst94ZGnnMl7PxbgPPD0s4BkIR3g3YT2bhyIDA
|
||||
-> ssh-ed25519 0IVRbA iEzMhoRhacu7KEbZC5AwGhIM4LPqZkTU6uiIVwm5wEg
|
||||
dbxRMrEpLMXOECfCvGgBgZvn3pGX9+DxRzSjZANJbP4
|
||||
-> ssh-ed25519 IY5FSQ BUmBe3r7emA3bUEvUpNanyLzxVmAjZyHWVGSQStvdgo
|
||||
V7W+sevmsGDBrOsyWM3CRSiZrW0gPyV5v/IrfqcdbFw
|
||||
-> ssh-ed25519 VQSaNw KqPjcuCZvM/Ao54AYHJHlZ9tLoUstwzsAESqlS/g12M
|
||||
6nVO0c0g+ULE0A1POGFaylpLR+HwRSnfkdXl0vR0FQw
|
||||
-> %Oq`'8n+-grease HV" C5b[8N
|
||||
ncBsUWVkkJ4UvIaxFWwN8SXvMUrk1J5pCAeRg2e1bHp75RkGd6apUWdg
|
||||
--- IpyGgm4d6PctYg3NCJ1FTHR9RSVh4dX+ERhj75xRH/4
|
||||
wM?8¥<38>£N˜w‚¶V¾ç(ɧ<C389>ÞÓã‚]ǨO
|
|
@ -2,4 +2,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
{ mail.publicKeys = (import ../../../keys.nix).machineKeysBySystem "nixos"; }
|
||||
{
|
||||
mail.publicKeys = (import ../../../keys.nix).machineKeysBySystem "nixos";
|
||||
ntfy.publicKeys = (import ../../../keys.nix).machineKeysBySystem "nixos";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue