Page 2 of 3

Re: Blank web interface

Posted: Mon Jul 21, 2014 4:26 am
by Fenos
I can ping the vserver. I set IP staticly again. Here is the content of this nagios.conf:

Code: Select all

ScriptAlias /nasgios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
Options ExecCGI
AllowOverride None
Order allow, deny
Allow from all
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/shere"
<Directory "/usr/local/nagios/shere">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>

Re: Blank web interface

Posted: Mon Jul 21, 2014 10:06 am
by abrist
You will need to make sure that the XI "program url" is set to the new static ip. From you PM it sounds like you are having db connection issues. Is mysqld starting?

Code: Select all

service mysqld status
service mysqld restart
tail -25 /var/log/mysqld.log

Re: Blank web interface

Posted: Mon Jul 28, 2014 2:55 am
by Fenos
Ok I checked myslqd is running, it's restarting and comming up again, but in that file there is something like that:

Code: Select all

[ERROR] /usr/libexec/mysqld: Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired
I tried to open that file, and it's jibberish inside. I tried to open it with "vi". Any advice?

Re: Blank web interface

Posted: Mon Jul 28, 2014 3:14 am
by Fenos
Ok I googled it and used script to repair my sqld:

Code: Select all

service mysqld stop

Code: Select all

/usr/local/nagiosxi/scripts/repairmysql.sh nagios

Code: Select all

service mysqld start
After that in that previous file I recived normal notifications:

Code: Select all

mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
InnoDB: Initializing buffer pool, size = 8.0M
InnoDB: Completed initialization of buffer pool
InnoDB: Started; log sequence number 0 44233
[Note] Event Scheduler: Loaded 0 events
[Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
After all that, I restarted network and httpd:

Code: Select all

/etc/init.d/network restart

Code: Select all

/etc/init.d/httpd restart
Something strange is going on. I set my IP on 'static' on "10.10.3.144" and I can ping that adress form nagios. I'm using vSphere and nagios is working there beside other Virtual Machines. What is strange, while nagios working I can't ping that specific adress from Windows lvl.

Additionally my

Code: Select all

/var/log/httpd/access_log
only shows a continuous stream of

Code: Select all

localhost.localdomain - - [28/Jul/2014:14:32:02 -0400] "POST /nagiosxi/backend/ HTTP/1.1" 200 809 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
Have you got some suggestions?

Re: Blank web interface

Posted: Mon Jul 28, 2014 11:16 am
by lmiltchev
What IP address do you see when you run "ifconfig" in the terminal? Do you see "10.10.3.144"? Disable selinux and stop temporarily iptables for testing purposes:

Code: Select all

setenforce 0
service iptables stop
Start a running tail on the apache error log:

Code: Select all

tail -f /var/log/httpd/error_log
then type "http://<ip address>/nagiosxi" in the browsers address bar and hit "Enter". If you still see a blank page, go back to the terminal, stop the tail (Ctrl+c), and copy/paste the output of the tail.

Re: Blank web interface

Posted: Tue Jul 29, 2014 2:20 am
by Fenos
Yes, I can see my ping after using ifconfig. Selinux was disabled from the begining. Output of httpd error_log:

Code: Select all

[date][warn]RSA server certificate CommonName (CN) '10.10.3.169' does not match server name!?
[date][notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations

Re: Blank web interface

Posted: Tue Jul 29, 2014 4:22 pm
by sreinhardt
The server certificate warning can be ignored, but I see two big issues here.

1) ifcfg-eth0 is using dhcp, I thought we were using a static address?

Code: Select all

BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
DEVICE=eth0
HWADDR=00:0c:29:b3:41:2b
USERCTL=no
IPV6INIT=no
DNS2=10.10.3.10
DNS1=10.10.3.5
PEERDNS=yes
Should probably be:
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
DEVICE=eth0
HWADDR=00:0c:29:b3:41:2b
USERCTL=no
IPV6INIT=no
IPADDR=10.10.3.144 # provided this is the IP you intend to use
NETMASK=255.255.255.0 # provided this is your netmask
GATEWAY=10.10.3.1 # provided this is your gateway
DNS2=10.10.3.10
DNS1=10.10.3.5
PEERDNS=yes

2) Apache's nagios config has the path wrong. You have:

Code: Select all

Alias /nagios "/usr/local/nagios/shere"
<Directory "/usr/local/nagios/shere">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
It should be:

Code: Select all

Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
Just a change from /usr/local/nagios/shere to /share. This will reference the correct nagios core paths.

As for other issues I see throughout this thread:
Something strange is going on. I set my IP on 'static' on "10.10.3.144" and I can ping that adress form nagios. I'm using vSphere and nagios is working there beside other Virtual Machines. What is strange, while nagios working I can't ping that specific adress from Windows lvl.
You changed your workstation or the nagios systems IP? When booting from DHCP, what is the ip of the nagios system? Can you access either http://nagiosip/nagios or http://nagiosip/nagiosxi?
Output of httpd error_log:
Is this all that the log file put out while you attempted to access the web interface? Try again with the access log this time so we can make sure the server is actually getting the requests.

tail -f /var/log/httpd/access_log
[request nagios or nagiosxi web interface]
ctrl+c to cancel the tail, and post the output for us.

Re: Blank web interface

Posted: Wed Jul 30, 2014 7:05 am
by Fenos
Yes, cfg-eth0 is exactly as you posted. I think I know what is the problem. We have some tricky configured web and router is not passing me through. We have to rebuild network in the office a bit, when we do that I will post my progres.

Re: Blank web interface

Posted: Thu Jul 31, 2014 9:54 am
by Fenos
Ok problem solved, I had to reroute IP.

But I have another problem, I have nagios on VM as you know and It's only accessable through my domain let's say: example.pl and only through port 5555.

I can get to welcome website of nagios, but when I try to "access Nagios" it sends me through http://<ipadress>.... and it's not loading.
I have to change this. Can you tell me how?

Re: Blank web interface

Posted: Fri Aug 01, 2014 11:32 am
by sreinhardt
Are you having these issues externally, such that when you are at home or out of the office it tries to redirect you to an internal office IP address? If so you need to set the external url in Admin->Manage System Config, and make sure that it uses the correct external name. If this is happening internally to your office as well, then you have issues with routing to the nagios system. You may still have to change the internal or external urls, to point to a firewall device and specific port that you workstation uses to access the nagios system.