It’s a permission issue of SELinux, run these two below commands to fix that error.
# chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/ # chcon -R -t httpd_sys_content_t /usr/local/nagios/share/
# chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/ # chcon -R -t httpd_sys_content_t /usr/local/nagios/share/