diff options
author | lassulus <lassulus@lassul.us> | 2020-09-15 20:16:44 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2020-09-15 20:16:44 +0200 |
commit | 624deaddd03101890d2974fc9340a26c00051bf3 (patch) | |
tree | 32b0f765be65385f092dff92ae09285a29a4845e /krebs/2configs/shack/prometheus/alertmanager-telegram.nix | |
parent | 91b7a2a58490a59d6090870a9db9eca8d11d9ab4 (diff) | |
parent | 57e6296ac4ca6b600f9e57b2c347f413096d09ed (diff) |
Merge remote-tracking branch 'gum/master' into HEAD
Diffstat (limited to 'krebs/2configs/shack/prometheus/alertmanager-telegram.nix')
-rw-r--r-- | krebs/2configs/shack/prometheus/alertmanager-telegram.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/krebs/2configs/shack/prometheus/alertmanager-telegram.nix b/krebs/2configs/shack/prometheus/alertmanager-telegram.nix new file mode 100644 index 000000000..9d0ef45e8 --- /dev/null +++ b/krebs/2configs/shack/prometheus/alertmanager-telegram.nix @@ -0,0 +1,17 @@ +{ pkgs, ...}: +{ + systemd.services.alertmanager-bot-telegram = { + wantedBy = [ "multi-user.target" ]; + after = [ "ip-up.target" ]; + serviceConfig = { + EnvironmentFile = toString <secrets/shack/telegram_bot.env>; + DynamicUser = true; + StateDirectory = "alertbot"; + ExecStart = ''${pkgs.alertmanager-bot-telegram}/bin/alertmanager-bot \ + --alertmanager.url=http://alert.prometheus.shack --log.level=info \ + --store=bolt --bolt.path=/var/lib/alertbot/bot.db \ + --listen.addr="0.0.0.0:16320" \ + --template.paths=${pkgs.alertmanager-bot-telegram}/templates/default.tmpl''; + }; + }; +} |