From bb1ce1dbd9953829c16a8bf9ccfd4008a94553c7 Mon Sep 17 00:00:00 2001 From: mc-fucker Date: Tue, 15 Feb 2022 15:35:45 +0100 Subject: [PATCH] better regex for systemd.exitstatus --- modules/zabbix-agent.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/zabbix-agent.nix b/modules/zabbix-agent.nix index df42285..6ac13f9 100644 --- a/modules/zabbix-agent.nix +++ b/modules/zabbix-agent.nix @@ -6,7 +6,7 @@ package = pkgs.zabbix.agent2; settings = { UserParameter = '' - systemd.exitstatus[*],systemctl status "$1" | grep "Main PID: " | grep -Po "(?<=status=)[0-9]{1,3}" + systemd.exitstatus[*],systemctl status "$1" | grep "Main PID: " | grep -Po "(?<=status=)[0-9]{1,3}(?=(/|))" ''; }; };