summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/prometheus/alertmanager-telegram.nix
blob: 8527001cb538b2b17c7ef2017bdeb5c33a699b29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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=${./templates}/shack.tmpl'';
    };
  };
}