cgi error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

cgi error

Post by veenm »

Hi ,
I recently installed the nagios core and while clicking the map option in GUI am getting below error.
The requested URL /nagios/cgi-bin/trends.cgi was not found on this server.
The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server.

Please let me know how to resolve this.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: cgi error

Post by slansing »

Can you run a find on your server for those .cgi files? Once you do show us the output below. Also, what distro and version of core is this? Have you ever had selinux problems? What does:

Code: Select all

getenforce
Output?
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

Re: cgi error

Post by veenm »

Below is the output i got.
[root@CNPUDAS011 etc]# getenforce
Enforcing
[root@CNPUDAS011 etc]# getenforce trends.cgi
Enforcing
[root@CNPUDAS011 etc]# getenforce statusmap.cgi
Enforcing


I am having nagios core 3.5.1 and plugin 1.4X
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: cgi error

Post by sreinhardt »

You should be disabling selinux unless you have enabled the policies specifically for nagios, and set the various file contexts needed. We can dig around for a guide online, but a simple search should bring up many things.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

Re: cgi error

Post by veenm »

how can i resolve this issue , please let me know. is there any modification i have to do in any .cfg file ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: cgi error

Post by abrist »

What distro are you running? If you are running centos or rhel, follow the steps:
http://www.centos.org/docs/5/html/5.2/D ... sable.html
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

Re: cgi error

Post by veenm »

I am using RHEL6 , what does below attached link do . how does it will help me to resolve my issue because in nagios main installation bundle also i did not see the statusmap.cgi file . Only i could see statusmap.c file.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: cgi error

Post by sreinhardt »

the statusmap.c file is compiled to statusmap.cgi. The link, explains how to disable selinux, as that is what you presently need to do to verify the install.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

Re: cgi error

Post by veenm »

I have already disabled the SELINUX but still mine problem is not resolved.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: cgi error

Post by abrist »

So "getenforce" now reports:

Code: Select all

Disabled
?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked