8 cfg = config.services.prometheus.alertmanagerWebhookLogger;
11 options.services.prometheus.alertmanagerWebhookLogger = {
12 enable = lib.mkEnableOption "Alertmanager Webhook Logger";
14 package = lib.mkPackageOption pkgs "alertmanager-webhook-logger" { };
16 extraFlags = lib.mkOption {
17 type = lib.types.listOf lib.types.str;
19 description = "Extra command line options to pass to alertmanager-webhook-logger.";
23 config = lib.mkIf cfg.enable {
24 systemd.services.alertmanager-webhook-logger = {
25 description = "Alertmanager Webhook Logger";
27 wantedBy = [ "multi-user.target" ];
28 after = [ "network-online.target" ];
29 wants = [ "network-online.target" ];
33 ${cfg.package}/bin/alertmanager-webhook-logger \
34 ${lib.escapeShellArgs cfg.extraFlags}
37 CapabilityBoundingSet = [ "" ];
40 NoNewPrivileges = true;
42 MemoryDenyWriteExecute = true;
44 LockPersonality = true;
46 ProtectProc = "invisible";
47 ProtectSystem = "strict";
48 ProtectHome = "tmpfs";
51 PrivateDevices = true;
56 ProtectHostname = true;
58 ProtectKernelTunables = true;
59 ProtectKernelModules = true;
60 ProtectKernelLogs = true;
61 ProtectControlGroups = true;
63 Restart = "on-failure";
65 RestrictAddressFamilies = [
69 RestrictNamespaces = true;
70 RestrictRealtime = true;
71 RestrictSUIDSGID = true;
85 meta.maintainers = [ lib.maintainers.jpds ];