It seems that a sudo -u check_pgbackrest is not possible, it always returns
/var/lib/nagios: Permission denied
A workaround is possible with sudo -iu and allowing bash -c check_pgbackrest but it would be better to solve the problem at root.
It seems that no_chdir=1 solve the problem, but that involves modifying the regex too.
It seems that a sudo -u check_pgbackrest is not possible, it always returns
/var/lib/nagios: Permission denied
A workaround is possible with sudo -iu and allowing bash -c check_pgbackrest but it would be better to solve the problem at root. It seems that
no_chdir=1
solve the problem, but that involves modifying the regex too.I may submit a real PR someday.