internal systemd function instead of regex for systemd.exitstatus
This commit is contained in:
parent
bb1ce1dbd9
commit
a7a44c908b
1 changed files with 1 additions and 1 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
package = pkgs.zabbix.agent2;
|
package = pkgs.zabbix.agent2;
|
||||||
settings = {
|
settings = {
|
||||||
UserParameter = ''
|
UserParameter = ''
|
||||||
systemd.exitstatus[*],systemctl status "$1" | grep "Main PID: " | grep -Po "(?<=status=)[0-9]{1,3}(?=(/|))"
|
systemd.exitstatus[*],systemctl show --value -p ExecMainStatus "$1"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue