I’ve few Nagios checks that require root privileges but running nrpe as root user is not acceptable. I prefer to use sudo for only these few commands.
visudo and coment out this line:
This change is crucial to get scripts working.
Then add at the end of file:
%nrpe ALL=(ALL) NOPASSWD: /usr/lib64/nagios/plugins/
nrpe group, but you have to add exactly group that your nrpe process uses.
Now you should be able to run checks as root - edit
/etc/nagios/nrpe.cfg and add check like this: