Some CGI files was not found on /nagios/cgi-bin

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.
Locked
carlosands
Posts: 4
Joined: Thu Jun 18, 2015 2:32 pm

Some CGI files was not found on /nagios/cgi-bin

Post by carlosands »

Hello!

After installation from source, some menu itens did not work. These files are not found on standard CGi folder:

statusmap.cgi
trends.cgi
histogram.cgi

My environment:

RedHat 6.5
Nagios Core 4.0.8

I've used the instructions found in documentation of this link : https://assets.nagios.com/downloads/nag ... Source.pdf

The installation process was clean and I haven't noticed for error messages.

I'm very experienced in IT , but I haven't much experience with Linux. Thanks for any help you could give me.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Some CGI files was not found on /nagios/cgi-bin

Post by ssax »

Can you post the full output from the install in code tags?

Also, post the full output of this command:

Code: Select all

ls -l /usr/local/nagios/sbin/
carlosands
Posts: 4
Joined: Thu Jun 18, 2015 2:32 pm

Re: Some CGI files was not found on /nagios/cgi-bin

Post by carlosands »

Hi ssax!

Here the output you requested:

-rwxrwxr-x 1 nagios nagios 307976 Jun 19 07:50 archivejson.cgi
-rwxrwxr-x 1 nagios nagios 287984 Jun 19 07:50 avail.cgi
-rwxrwxr-x 1 nagios nagios 288464 Jun 19 07:50 cmd.cgi
-rwxrwxr-x 1 nagios nagios 259280 Jun 19 07:50 config.cgi
-rwxrwxr-x 1 nagios nagios 300240 Jun 19 07:50 extinfo.cgi
-rwxrwxr-x 1 nagios nagios 234704 Jun 19 07:50 history.cgi
-rwxrwxr-x 1 nagios nagios 230864 Jun 19 07:50 notifications.cgi
-rwxrwxr-x 1 nagios nagios 308744 Jun 19 07:50 objectjson.cgi
-rwxrwxr-x 1 nagios nagios 226480 Jun 19 07:50 outages.cgi
-rwxrwxr-x 1 nagios nagios 230864 Jun 19 07:50 showlog.cgi
-rwxrwxr-x 1 nagios nagios 300272 Jun 19 07:50 status.cgi
-rwxrwxr-x 1 nagios nagios 306600 Jun 19 07:50 statusjson.cgi
-rwxrwxr-x 1 nagios nagios 247024 Jun 19 07:50 statuswml.cgi
-rwxrwxr-x 1 nagios nagios 230768 Jun 19 07:50 statuswrl.cgi
-rwxrwxr-x 1 nagios nagios 255248 Jun 19 07:50 summary.cgi
-rwxrwxr-x 1 nagios nagios 242960 Jun 19 07:50 tac.cgi

But I don't know how to found the output from the install. May you help me on this?

Before I create this topic, I tryed some things I found in other topics, because this, the logs possibly will be altered in comparison with the original state.

Thanks.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Some CGI files was not found on /nagios/cgi-bin

Post by jolson »

When you followed the instructions initially, did you have SELinux enabled?

Code: Select all

sestatus
If so, I recommend disabling it and running through the following setup procedure:

Install all pre-requisite packages:

Code: Select all

yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp unzip automake
Change to the tmp directory, and download Nagios Core and Nagios Plugins:

Code: Select all

cd /tmp
wget https://github.com/NagiosEnterprises/nagioscore/archive/master.tar.gz -O nagioscore.tar.gz
wget https://github.com/nagios-plugins/nagios-plugins/archive/master.tar.gz -O nagiosplugins.tar.gz
Add the appropriate user and group for the Nagios process (we recommend 'nagios' and 'nagcmd'), and assign nagios+apache to the nagcmd group:

Code: Select all

useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache
Run the following commands to unpack the Nagios Core and Nagios Plugins source code into tmp:

Code: Select all

tar xzf nagioscore.tar.gz
tar xzf nagiosplugins.tar.gz
Change directory to nagioscore:

Code: Select all

cd nagioscore-master
Run the configure command to get the source code ready for compilation:

Code: Select all

./configure --with-command-group=nagcmd
Compile and install:

Code: Select all

make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
Complete the installation:

Code: Select all

cp -R contrib/eventhandlers /usr/local/nagios/libexec
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
Run the Nagios verification command to ensure the install completed properly, and start Nagios:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios start
Add a default user for web interface access, and start apache (we recommend calling the user 'nagiosadmin'):

Code: Select all

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
/etc/init.d/httpd start
Change to the Nagios Plugins directory to compile and install the plugins:

Code: Select all

cd /tmp/nagios-plugins-master/
./tools/setup
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
Register the Nagios service and Apache to be run upon system startup:

Code: Select all

chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --add httpd
chkconfig --level 35 httpd on
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
carlosands
Posts: 4
Joined: Thu Jun 18, 2015 2:32 pm

Re: Some CGI files was not found on /nagios/cgi-bin

Post by carlosands »

Hi jolson,

Yes, the selinux is disabled, I've already read this recommendation some times in other topics.
I'll follow the procedures you've posted and return later to report the situation after.
carlosands
Posts: 4
Joined: Thu Jun 18, 2015 2:32 pm

Re: Some CGI files was not found on /nagios/cgi-bin

Post by carlosands »

Hi jolson!

Success! All menu itens are fully functioning!

Thank for your help!

But, in the process, we've changed the version of the software. Before these procedures, I've installed the version Core 4.0.8, and now I've Core 4.1rc1. This isn't an source of risk of bugs unhandled?

Thank you!
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Some CGI files was not found on /nagios/cgi-bin

Post by jdalrymple »

Glad that worked for you.

Installing RC does increase the likelihood that you'll find unresolved issues in the new features of the code. Most of the core code will remain stable and Nagios should be very usable with the RC install. I recommend leaving it if it works for you, but then updating to the release version after it drops. If you find any bugs please report them to us, that's the whole point of the RC.
Locked