better regex for systemd.exitstatus

This commit is contained in:
mc-fucker 2022-02-15 15:35:45 +01:00
parent 8a67aae7c4
commit bb1ce1dbd9

View file

@ -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}(?=(/|))"
'';
};
};