Page 1 of 1

Nagios Core - Unable to get process status

Posted: Tue May 19, 2020 12:09 pm
by raul.hernandez
Hello,

I installed nagios core in a centos 7.8 server but I'm getting an "Unable to get process status" error message in the home page
Image

The service is running and when I check the logs I don't see any errors
Image

Can you tell me if there are other locations or tests I can do to troubleshoot this error?
SELinux is disabled btw

Thanks,

Re: Nagios Core - Unable to get process status

Posted: Tue May 19, 2020 3:04 pm
by benjaminsmith
Hi,

Thanks for posting to the Nagios Community Forum. Just to double-check make sure it's set to (SELinux) disabled in the following file:

Code: Select all

/etc/sysconfig/selinux
Do you see any errors in the Apache log?

Code: Select all

tail /var/log/httpd/error_log
Lastly, what instructions did you follow to install Core?

Re: Nagios Core - Unable to get process status

Posted: Thu May 21, 2020 9:22 am
by raul.hernandez
The apache log shows this:

Code: Select all

[Thu May 21 09:32:43.110225 2020] [cgi:error] [pid 25772] [client 200.30.142.93:61128] AH01215: suexec policy violation: see suexec log for more details: /usr/local/nagios/sbin/statusjson.cgi, referer: http://haswell.prodbx.com/nagios/main.php
[Thu May 21 09:32:43.110298 2020] [cgi:error] [pid 25772] [client 200.30.142.93:61128] End of script output before headers: statusjson.cgi, referer: http://haswell.prodbx.com/nagios/main.php
[Thu May 21 09:52:34.318342 2020] [cgi:error] [pid 25772] [client 200.30.142.93:61521] AH01215: suexec policy violation: see suexec log for more details: /usr/local/nagios/sbin/statusjson.cgi, referer: http://haswell.prodbx.com/nagios/main.php
[Thu May 21 09:52:34.318404 2020] [cgi:error] [pid 25772] [client 200.30.142.93:61521] End of script output before headers: statusjson.cgi, referer: http://haswell.prodbx.com/nagios/main.php
[Thu May 21 10:10:44.550094 2020] [cgi:error] [pid 2045] [client 200.30.142.93:62021] AH01215: suexec policy violation: see suexec log for more details: /usr/local/nagios/sbin/statusjson.cgi, referer: http://haswell.prodbx.com/nagios/main.php
[Thu May 21 10:10:44.550170 2020] [cgi:error] [pid 2045] [client 200.30.142.93:62021] End of script output before headers: statusjson.cgi, referer: http://haswell.prodbx.com/nagios/main.php
[Thu May 21 10:11:23.339109 2020] [cgi:error] [pid 10433] [client 200.30.142.93:62037] AH01215: suexec policy violation: see suexec log for more details: /usr/local/nagios/sbin/statusjson.cgi, referer: http://haswell.prodbx.com/nagios/main.php
[Thu May 21 10:11:23.339182 2020] [cgi:error] [pid 10433] [client 200.30.142.93:62037] End of script output before headers: statusjson.cgi, referer: http://haswell.prodbx.com/nagios/main.php
[Thu May 21 10:11:55.563723 2020] [cgi:error] [pid 25742] [client 200.30.142.93:62066] AH01215: suexec policy violation: see suexec log for more details: /usr/local/nagios/sbin/statusjson.cgi, referer: http://haswell.prodbx.com/nagios/main.php
[Thu May 21 10:11:55.563807 2020] [cgi:error] [pid 25742] [client 200.30.142.93:62066] End of script output before headers: statusjson.cgi, referer: http://haswell.prodbx.com/nagios/main.php
so, I checked suexec logs and found some issues with file permissions which I corrected and apparently there are no more errors there but I'm still getting the same message in the home page

Code: Select all

[2020-05-21 10:10:44]: uid: (1001/dbx) gid: (1003/dbx) cmd: statusjson.cgi
[2020-05-21 10:10:44]: file is writable by others: (/usr/local/nagios/sbin/statusjson.cgi)
[2020-05-21 10:11:23]: uid: (1001/dbx) gid: (1003/dbx) cmd: statusjson.cgi
[2020-05-21 10:11:23]: file has no execute permission: (/usr/local/nagios/sbin/statusjson.cgi)
[2020-05-21 10:11:55]: uid: (1001/dbx) gid: (1003/dbx) cmd: statusjson.cgi
[2020-05-21 10:11:55]: file has no execute permission: (/usr/local/nagios/sbin/statusjson.cgi)
[2020-05-21 10:12:47]: uid: (1001/dbx) gid: (1003/dbx) cmd: statusjson.cgi
[2020-05-21 10:13:56]: uid: (1001/dbx) gid: (1003/dbx) cmd: statusjson.cgi
[2020-05-21 10:15:24]: uid: (1001/dbx) gid: (1003/dbx) cmd: statusjson.cgi
[2020-05-21 10:21:03]: uid: (1001/dbx) gid: (1003/dbx) cmd: statusjson.cgi
I followed this guide: https://assets.nagios.com/downloads/nag ... entos7.pdf

Thanks for your help

Re: Nagios Core - Unable to get process status

Posted: Fri May 22, 2020 2:46 pm
by cdienger
Make sure that there are execute permissions for this file and the other .cgi files. It should look like:

Code: Select all

-rwxrwxr-x 1 nagios nagios 324720 Nov 25 21:14 archivejson.cgi
-rwxrwxr-x 1 nagios nagios 310112 Nov 25 21:14 avail.cgi
-rwxrwxr-x 1 nagios nagios 301616 Nov 25 21:14 cmd.cgi
-rwxrwxr-x 1 nagios nagios 273168 Nov 25 21:14 config.cgi
-rwxrwxr-x 1 nagios nagios 314176 Nov 25 21:14 extinfo.cgi
-rwxrwxr-x 1 nagios nagios 269256 Nov 25 21:14 histogram.cgi
-rwxrwxr-x 1 nagios nagios 248648 Nov 25 21:14 history.cgi
-rwxrwxr-x 1 nagios nagios 244528 Nov 25 21:14 notifications.cgi
-rwxrwxr-x 1 nagios nagios 322416 Nov 25 21:14 objectjson.cgi
-rwxrwxr-x 1 nagios nagios 240400 Nov 25 21:14 outages.cgi
-rwxrwxr-x 1 nagios nagios 236304 Nov 25 21:14 outages-xml.cgi
-rwxrwxr-x 1 nagios nagios 240416 Nov 25 21:14 showlog.cgi
-rwxrwxr-x 1 nagios nagios 318296 Nov 25 21:14 status.cgi
-rwxrwxr-x 1 nagios nagios 240392 Nov 25 21:14 status-json.cgi
-rwxrwxr-x 1 nagios nagios 320560 Nov 25 21:14 statusjson.cgi
-rwxrwxr-x 1 nagios nagios 265232 Nov 25 21:14 statusmap.cgi
-rwxrwxr-x 1 nagios nagios 260960 Nov 25 21:14 statuswml.cgi
-rwxrwxr-x 1 nagios nagios 244544 Nov 25 21:14 statuswrl.cgi
-rwxrwxr-x 1 nagios nagios 265064 Nov 25 21:14 summary.cgi
-rwxrwxr-x 1 nagios nagios 256880 Nov 25 21:14 tac.cgi
-rwxrwxr-x 1 nagios nagios 240488 Nov 25 21:14 tac-xml.cgi
-rwxrwxr-x 1 nagios nagios 273360 Nov 25 21:14 trends.cgi
and can be set with:

Code: Select all

chown nagios:nagios /usr/local/nagios/sbin/*
chmod 775 /usr/local/nagios/sbin/*

Re: Nagios Core - Unable to get process status

Posted: Fri May 22, 2020 5:17 pm
by raul.hernandez
I was able to fix the issue by changing the permissions to 755 in /usr/local/nagios/bin/ and /usr/local/nagios/sbin/
Thanks!

Re: Nagios Core - Unable to get process status

Posted: Tue May 26, 2020 2:59 pm
by benjaminsmith
I was able to fix the issue by changing the permissions to 755 in /usr/local/nagios/bin/ and /usr/local/nagios/sbin/
Thanks!
Awesome! We'll lock this one up.

Thank you for visiting the Nagios Community Support Forum.