Hoping someone can point me in the right direction, not sure if this is an issue with lxd and running nagio-nrpe-server inside it, running certain checks fails running it with the standard systemd init scripts, running it manually works fine.
Running with “/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f” the remote checks runs and all good.
When I start it with “systemctl start nagios-nrpe-server.service” I get:
“WARNING: my_system() seteuid(0): Operation not permitted”
Is there any setting I can enable in my lxd config that will make this work out of the box or some systemd issue?
After some more troubleshooting we narrowed it down to some files that are supposed to be read in the /tmp/ folder by the nagios user, the check basically uses that as a reference to check folder locations for stuck files in folders.
I moved the files to the nagios user $HOME folder and I still get the same error in the nagios debug, but the check completes at least and gives me the correct output. This used to run on a VM and was moved into a container, still not sure why /tmp/ gets treated differently inside the container running via systemd.
So I guess I found a workaround, but no the actual cause :).
Thank you, I did think of that one and I suspect it will work but it feels wrong to change “defaults” but I will test that and then mark that as a potential solution for someone stuck with a similar issue. Thanks again for your time.