2020-09-13 21:52:22 +00:00
|
|
|
{ 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 \
|
2020-09-21 22:53:54 +00:00
|
|
|
--alertmanager.url=http://alert.prometheus.shack --log.level=info \
|
2020-09-13 21:52:22 +00:00
|
|
|
--store=bolt --bolt.path=/var/lib/alertbot/bot.db \
|
|
|
|
--listen.addr="0.0.0.0:16320" \
|
2020-09-14 14:56:30 +00:00
|
|
|
--template.paths=${./templates}/shack.tmpl'';
|
2020-09-13 21:52:22 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|