No access to the Nagios through the browser

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

No access to the Nagios through the browser

Postby hamrad » Thu May 19, 2016 4:35 am

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 ... s-and-CLIs)/Web-Interfaces/Themes-and-Skins/Vautour-Style/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!
hamrad
 
Posts: 8
Joined: Thu May 19, 2016 2:57 am

Re: No access to the Nagios through the browser

Postby rkennedy » Thu May 19, 2016 9:41 am

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
rkennedy
 
Posts: 6581
Joined: Mon Oct 05, 2015 11:45 am

Re: No access to the Nagios through the browser

Postby hamrad » Thu May 19, 2016 10:45 am

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

Re: No access to the Nagios through the browser

Postby mcapra » Thu May 19, 2016 11:27 am

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
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3587
Joined: Thu May 05, 2016 3:54 pm

Re: No access to the Nagios through the browser

Postby hamrad » Fri May 20, 2016 2:23 am

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

Re: No access to the Nagios through the browser

Postby rkennedy » Fri May 20, 2016 11:02 am

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
rkennedy
 
Posts: 6581
Joined: Mon Oct 05, 2015 11:45 am

Re: No access to the Nagios through the browser

Postby hamrad » Mon May 23, 2016 9:37 am

rkennedy, thank You!
Thank You for this manual! I'll try a fresh install and then write what happened in the end.
hamrad
 
Posts: 8
Joined: Thu May 19, 2016 2:57 am

Re: No access to the Nagios through the browser

Postby mcapra » Mon May 23, 2016 9:46 am

Let us know what your results are!
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3587
Joined: Thu May 05, 2016 3:54 pm

Re: No access to the Nagios through the browser

Postby hamrad » Tue May 24, 2016 5:03 am

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

Re: No access to the Nagios through the browser

Postby rkennedy » Tue May 24, 2016 10:07 am

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
rkennedy
 
Posts: 6581
Joined: Mon Oct 05, 2015 11:45 am

Next

Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 11 guests