Page 1 of 1

/nagios/cgi-bin/statusmap.cgi was not found

Posted: Fri Sep 06, 2013 8:04 am
by ricardowesley
On my Nagios Core 3.5 Web interface, I receive the messages when I Map under Current Status>>>The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server.

How do I resolve this?

Re: /nagios/cgi-bin/statusmap.cgi was not found

Posted: Fri Sep 06, 2013 11:42 am
by abrist
Do you have any other cgi-bin errors?
Do you have all the necessary files in your cgi-bin folder?

Code: Select all

ls -la /usr/local/nagios/sbin/

Re: /nagios/cgi-bin/statusmap.cgi was not found

Posted: Fri Sep 06, 2013 12:11 pm
by ricardowesley
I receives cgi-bin errors only in the browser as stated earlier. In my /var/log/messages output...I have be receiving these cgi errors below:

Sep 6 12:08:43 plxnagios kernel: type=1400 audit(1378483723.741:36967): avc: denied { execute } for pid=19039 comm="httpd" name="tac.cgi" dev=dm-0 ino=1317286 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:usr_t:s0 tclass=file
Sep 6 12:08:43 plxnagios kernel: type=1400 audit(1378483723.741:36968): avc: denied { execute_no_trans } for pid=19039 comm="httpd" path="/usr/local/nagios/sbin/tac.cgi" dev=dm-0 ino=1317286 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:usr_t:s0 tclass=file
Sep 6 12:24:54 plxnagios kernel: type=1400 audit(1378484694.412:36977): avc: denied { execute } for pid=19165 comm="httpd" name="status.cgi" dev=dm-0 ino=1317282 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:usr_t:s0 tclass=file
Sep 6 12:24:54 plxnagios kernel: type=1400 audit(1378484694.412:36978): avc: denied { execute_no_trans } for pid=19165 comm="httpd" path="/usr/local/nagios/sbin/status.cgi" dev=dm-0 ino=1317282 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:usr_t:s0 tclass=file

2. Where is the "cgi-bin" folder...it is not in /usr/local/nagios/sbin?
Here are this folders contents>avail.cgi cmd.cgi config.cgi extinfo.cgi history.cgi notifications.cgi outages.cgi showlog.cgi status.cgi statuswml.cgi statuswrl.cgi summary.cgi tac.cgi

Re: /nagios/cgi-bin/statusmap.cgi was not found

Posted: Fri Sep 06, 2013 1:48 pm
by abrist
1. Looks like context errors, are you using selinux?

Code: Select all

getenforce

2. The directory '/usr/local/nagios/sbin' is the nagios cgi-bin folder as it contains the cgi binaries. statusmap.cgi is missing from this folder (and it should not be). How did you install nagios core?

Re: /nagios/cgi-bin/statusmap.cgi was not found

Posted: Fri Sep 06, 2013 4:40 pm
by ricardowesley
1. I installed from source>>>http://assets.nagios.com/downloads/nagi ... Source.pdf

2. I am now able to see Nagios Core interface map. Progress...Thanks
In the map, I am only seeing the graphic...Nagios Process and localhost(with a question mark)

In my /var/log/messages…I am still receiving these error messages. I think that they are related to me not being able to see additional nodes on my network.

Sep 9 08:36:08 plxnagios kernel: type=1400 audit(1378730168.116:37062): avc: denied { read write } for pid=25582 comm="ping" path="/usr/local/nagios/var/spool/checkresults/checkHAq3hs" dev=dm-0 ino=1456177 scontext=unconfined_u:system_r:ping_t:s0 tcontext=unconfined_u:object_r:usr_t:s0 tclass=file
Sep 9 08:38:51 plxnagios kernel: type=1400 audit(1378730331.967:37063): avc: denied { execute } for pid=25596 comm="httpd" name="statusmap.cgi" dev=dm-0 ino=1317016 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:usr_t:s0 tclass=file
Sep 9 08:38:51 plxnagios kernel: type=1400 audit(1378730331.967:37064): avc: denied { execute_no_trans } for pid=25596 comm="httpd" path="/usr/local/nagios/sbin/statusmap.cgi" dev=dm-0 ino=1317016 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:usr_t:s0 tclass=file

3. Nagios Core 3.5.0 on RHEL 6.4
Upon further investigation...I have found that I do not have check_snmp in my /usr/local/nagios/libexec directory. I am certain that is the reason why my nagios cannot monitor.
Where on the Nagios website can I find the right snmp plugin for my version?

Re: /nagios/cgi-bin/statusmap.cgi was not found

Posted: Mon Sep 09, 2013 12:24 pm
by abrist
1. If you followed that doc, then you should have a statusmap.cgi
2. Did you rebuild it (statusmap.cgi), or was it somewhere else, etc?

Did you ever resolve the selinux issues? What is the output of:

Code: Select all

getenforce
3. This is usually included in the nagios-plugins package, which should have been installed per the core install doc that you linked. Are you sure the install was successful?

Re: /nagios/cgi-bin/statusmap.cgi was not found

Posted: Tue Sep 10, 2013 7:12 am
by ricardowesley
setenforce=Permissive
I have reinstall Nagios Core 3.5 via source instructions from Nagios a few times. I am certain that the latest install is correct.

Re: /nagios/cgi-bin/statusmap.cgi was not found

Posted: Tue Sep 10, 2013 9:59 am
by abrist
selinux is enabled, but operating in permissive mode. You continue to receive warnings until you either resolve the context issues or just disable selinux.
Well, even though core installed correctly, you are still missing statusmap.cgi. Run a find and see if we can find it:

Code: Select all

find / -name statusmap.cgi

Re: /nagios/cgi-bin/statusmap.cgi was not found

Posted: Tue Sep 10, 2013 11:03 am
by ricardowesley
Problem resoved...I used a solution from this link>>>http://www.unixmen.com/nagioscgi-binsta ... is-server/
It worked