No access to the Nagios through the browser

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.
hamrad
Posts: 8
Joined: Thu May 19, 2016 2:57 am

No access to the Nagios through the browser

Post by hamrad »

Hello!
First, please sorry for my bad English...
I've installed Nagios according to these instructions: https://assets.nagios.com/downloads/nag ... Source.pdf
Nagios Core 4.1.1
Nagios Plugins 2.1.1
And use Frontend Vautour: https://exchange.nagios.org/directory/A ... le/details
Installation of the software passed without problems. Nagios server and the Apache - are started (I see some of nagios-processes in the "top"), the Nagios config checked without any problems too. But when I trying to connect through the browser - page not found...
I use CentOS 7 x86_64-minimal with Apache 2.4.6, PHP 5.4.16.
I have read much of forums, but cannot resolve my problem... May be I need to install any packages else (I use a minimal installation package of operational system)?
Thank You!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: No access to the Nagios through the browser

Post by rkennedy »

Which page are you trying to access? Was it previously working before you installed the frontend?

Can you post your apache log files for us to look at?

Code: Select all

/var/log/httpd/error_log
/var/log/httpd/ssl_error_log
/var/log/httpd/access_log
/var/log/httpd/ssl_access_log
Additionally, please post your entire /etc/httpd/conf.d directory for us to look at.
Former Nagios Employee
hamrad
Posts: 8
Joined: Thu May 19, 2016 2:57 am

Re: No access to the Nagios through the browser

Post by hamrad »

Hello, rkennedy! Thank you for reply!
I trying to access as http://{server_ip_address}/nagios
No, it also not working before I install Frontend (I just thought that, probably, it does not work because Fronend is not installed).
Yes, please (Nagios runs on another server, so I will put here a screenshots):
/var/log/httpd/error_log:
Image
/var/log/httpd/ssl_error_log:
I got such message: "unable to open "/var/log/httpd/ssl_error_log": no such file or directory"
/var/log/httpd/access_log:
Image
/var/log/httpd/ssl_access_log:
I got a similar message, as well as for /var/log/httpd/ssl_error_log

Here is screenshot of /etc/httpd/conf.d directory:
Image
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: No access to the Nagios through the browser

Post by mcapra »

It could be an iptables rule that is preventing traffic. Try the following command where x.x.x.x is the IP address of the machine you are accessing Nagios from (not the Nagios server itself):

Code: Select all

iptables -I INPUT 1 -s x.x.x.x -p tcp -m tcp --dport 80 -j ACCEPT
That command should put traffic from ip x.x.x.x on port 80 at the top of the INPUT rule chain. If this doesn't solve your problem, please post the output of iptables -S INPUT
Former Nagios employee
https://www.mcapra.com/
hamrad
Posts: 8
Joined: Thu May 19, 2016 2:57 am

Re: No access to the Nagios through the browser

Post by hamrad »

Hello, mcapra! Thank you for reply!
The IP address of my Nagios-server is 192.168.68.14, and the IP addres of my computer is 192.168.32.151. So I write:

Code: Select all

iptables -I INPUT 1 -s 192.168.32.151 -p tcp -m tcp --dport 80 -j ACCEPT
- it is correct?..
After it trying to access http://192.168.68.14/nagios (and after - /nagvis : I also install it) And it almost started to work... See screenshots below:
Image
Image
And output of iptables -S INPUT:
Image
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: No access to the Nagios through the browser

Post by rkennedy »

I would recommend a fresh install, or perhaps take a look at this document I wrote (which is a bit newer).
https://assets.nagios.com/downloads/nag ... entos7.pdf

If that isn't an option, then please post the exact contents of what's in every file for your conf.d directory. I don't think this is firewall related, because you wouldn't be able to access the page at all in that case.
Former Nagios Employee
hamrad
Posts: 8
Joined: Thu May 19, 2016 2:57 am

Re: No access to the Nagios through the browser

Post by hamrad »

rkennedy, thank You!
Thank You for this manual! I'll try a fresh install and then write what happened in the end.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: No access to the Nagios through the browser

Post by mcapra »

Let us know what your results are!
Former Nagios employee
https://www.mcapra.com/
hamrad
Posts: 8
Joined: Thu May 19, 2016 2:57 am

Re: No access to the Nagios through the browser

Post by hamrad »

Hello, mcapra!
It works! :) Almost...
After installation, I had to additionally apply the rule to the firewall (from rkennedy's manual):

Code: Select all

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
And then I was able to access the Nagios web interface. So, these manual is very useful, thanks! :D
And why again "almost"?..
After running Nagios and its preset, I found that my network equipment polled incorrectly - namely, poll of some services with check_snmp command. Look screenshot here:
Image
Well, I look into /usr/local/nagios/libexec/ directory and cannot find there a check_snmp plugin... Hmm. But in the folder where I unpack the downloaded archive, this plugin is present... It appears that it is for some reason not been installed... Can I understood it - why?..
Thank You!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: No access to the Nagios through the browser

Post by rkennedy »

You will need to compile the plugins. Are they still in the /tmp directory? Try these commands if so -

Code: Select all

cd /tmp/nagios-plugins-2.1.1
./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl
make all
make install
Then try, ls /usr/local/nagios/libexec/ and post the result. This could also be related to permissions.
Former Nagios Employee
Locked