Archived
modularized docker health to gotify service
This commit is contained in:
@@ -27,7 +27,8 @@ in
|
||||
../../modules/tailscale/enable-service.nix
|
||||
../../modules/rotate-traefik-logs.nix
|
||||
../../modules/raspi/mount-data.nix
|
||||
../../modules/nextcloud-cron-job.nix
|
||||
../../modules/services/nextcloud-cron-job.nix
|
||||
../../modules/services/docker-health-to-gotify.nix
|
||||
];
|
||||
|
||||
|
||||
@@ -117,30 +118,30 @@ services.rpcbind.enable = true;
|
||||
|
||||
# Create Gotify Docker monitoring script task
|
||||
|
||||
systemd.services.docker-health-to-gotify = {
|
||||
description = "Alert Gotify when Docker containers become unhealthy";
|
||||
after = [ "docker.service" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
# Run as root so it can read /etc/secrets and access docker socket
|
||||
# User = "root";
|
||||
#EnvironmentFile = "-/etc/secrets/docker-health-alert.env";
|
||||
ExecStart = "${pkgs.bash}/bin/bash /home/nixos/docker/monitoring/gotify/docker-health-to-gotify.sh";
|
||||
StandardOutput = "journal";
|
||||
StandardError = "journal";
|
||||
};
|
||||
path = with pkgs; [ docker curl coreutils gnused ];
|
||||
};
|
||||
# systemd.services.docker-health-to-gotify = {
|
||||
# description = "Alert Gotify when Docker containers become unhealthy";
|
||||
# after = [ "docker.service" ];
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# # Run as root so it can read /etc/secrets and access docker socket
|
||||
# # User = "root";
|
||||
# #EnvironmentFile = "-/etc/secrets/docker-health-alert.env";
|
||||
# ExecStart = "${pkgs.bash}/bin/bash /home/nixos/docker/monitoring/gotify/docker-health-to-gotify.sh";
|
||||
# StandardOutput = "journal";
|
||||
# StandardError = "journal";
|
||||
# };
|
||||
# path = with pkgs; [ docker curl coreutils gnused ];
|
||||
# };
|
||||
|
||||
systemd.timers.docker-health-to-gotify = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "2min";
|
||||
OnUnitActiveSec = "1min";
|
||||
AccuracySec = "15s";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
# systemd.timers.docker-health-to-gotify = {
|
||||
# wantedBy = [ "timers.target" ];
|
||||
# timerConfig = {
|
||||
# OnBootSec = "2min";
|
||||
# OnUnitActiveSec = "1min";
|
||||
# AccuracySec = "15s";
|
||||
# Persistent = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
# Create /mnt/docker
|
||||
|
||||
Reference in New Issue
Block a user