Page 1 of 1

Side bar on the nagios home page not working

Posted: Tue Sep 15, 2015 10:45 am
by sinkak
nagios UI was working fine until i installed NXLOG.

Code: Select all

sudo wget http://downloads.sourceforge.net/project/nxlog-ce/nxlog-ce-2.8.1248.tar.gz
tar zxvf nxlog-ce-2.8.1248.tar.gz
cd nxlog-ce-2.8.1248/
aptitude install libpcre3-dev libapr1-dev libssl-dev libexpat-dev make
sudo aptitude install libpcre3-dev libapr1-dev libssl-dev libexpat-dev ma 
UI failed and had apache error.

Code: Select all

ubuntu@nagios-2015:/var/log/apache2$ tail -f error.log
[Mon Sep 14 14:33:47.737665 2015] [:error] [pid 16596] [client 104.128.144.131:47547] script '/var/www/html/redirect.php' not found or unable to stat
[Mon Sep 14 18:40:59.436193 2015] [mpm_prefork:notice] [pid 29808] AH00169: caught SIGTERM, shutting down
[Mon Sep 14 18:41:00.421125 2015] [mpm_prefork:notice] [pid 22129] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Sep 14 18:41:00.421189 2015] [core:notice] [pid 22129] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 14 18:41:01.587127 2015] [mpm_prefork:notice] [pid 22129] AH00169: caught SIGTERM, shutting down
[Tue Sep 15 15:09:34.098091 2015] [mpm_prefork:notice] [pid 19891] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Tue Sep 15 15:09:34.098150 2015] [core:notice] [pid 19891] AH00094: Command line: '/usr/sbin/apache2'
[Tue Sep 15 15:12:15.523299 2015] [mpm_prefork:notice] [pid 19891] AH00169: caught SIGTERM, shutting down
[Tue Sep 15 15:12:16.661825 2015] [mpm_prefork:notice] [pid 22556] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.11 configured -- resuming normal operations
[Tue Sep 15 15:12:16.661861 2015] [core:notice] [pid 22556] AH00094: Command line: '/usr/sbin/apache2'
so installed apache and php

Code: Select all

apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt 
Now only Home page is working, side bar is not working.
sidephp.png

Code: Select all

ubuntu@nagios:/var/log/apache2$ tail -f access.log
 nagiosadmin [15/Sep/2015:15:13:12 +0000] "GET /nagios/stylesheets/common.css?%3C?php%20echo%20$this_version;%20?%3E HTTP/1.1" 200 2759 "http://52.6.142.190/nagios/side.php" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"
- nagiosadmin [15/Sep/2015:15:13:12 +0000] "GET /nagios/stylesheets/common.css?4.0.8 HTTP/1.1" 200 2759 "http://52.6.142.190/nagios/main.php" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"
 nagiosadmin [15/Sep/2015:15:13:12 +0000] "GET /nagios/cgi-bin/statusjson.cgi?query=programstatus HTTP/1.1" 200 1341 "http://52.6.142.190/nagios/main.php" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"
- nagiosadmin [15/Sep/2015:15:13:22 +0000] "GET /nagios/%3C?php%20echo%20$cfg[ HTTP/1.1" 404 502 "http://52.6.142.190/nagios/side.php" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"
 nagiosadmin [15/Sep/2015:15:13:32 +0000] "GET /nagios/%3C?php%20echo%20$cfg[ HTTP/1.1" 404 502 "http://52.6.142.190/nagios/side.php" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"
 nagiosadmin [15/Sep/2015:15:17:35 +0000] "GET /nagios/ HTTP/1.1" 200 793 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"
 nagiosadmin [15/Sep/2015:15:17:36 +0000] "GET /nagios/main.php HTTP/1.1" 200 3635 "http://52.6.142.190/nagios/" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"
 nagiosadmin [15/Sep/2015:15:17:36 +0000] "GET /nagios/stylesheets/common.css?%3C?php%20echo%20$this_version;%20?%3E HTTP/1.1" 200 2759 "http://52.6.142.190/nagios/side.php" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"
 nagiosadmin [15/Sep/2015:15:17:36 +0000] "GET /nagios/stylesheets/common.css?4.0.8 HTTP/1.1" 200 2759 "http://52.6.142.190/nagios/main.php" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"
 nagiosadmin [15/Sep/2015:15:17:37 +0000] "GET /nagios/cgi-bin/statusjson.cgi?query=programstatus HTTP/1.1" 200 1341 "http://52.6.142.190/nagios/main.php" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"

How can i fix this?

Thank you for your help

Re: Side bar on the nagios home page not working

Posted: Tue Sep 15, 2015 11:15 am
by jolson
not found or unable to stat
Is it possible that your disk is filling up?

Code: Select all

df -h
df -i
When you reinstalled apache, you may have overwritten some of your apache config files. Let's check on them:

Code: Select all

cd /etc/apache2

Code: Select all

find . -name *.conf | tee /dev/tty | xargs cat

Re: Side bar on the nagios home page not working

Posted: Tue Sep 15, 2015 11:42 am
by sinkak
not found or unable to stat i
is gone after apache2 and php install.
disk space is only 48 % full.

in /etc/apache2

Code: Select all

ubuntu@nagios:/etc/apache2$ ls
apache2.conf  conf-available  conf-enabled  envvars  magic  mods-available  mods-enabled  ports.conf  sites-available  sites-enabled
only change i made during nagios installation in apache is
sudo vi /etc/apache2/sites-available/nagios.conf

Find and comment the following two lines by adding # symbols in front of them:

Order allow,deny
Allow from all

Then uncomment the following lines, by deleting the # symbols, and add the IP addresses or ranges (space delimited) that you want to allow to in the Allow from line:

# Order deny,allow
# Deny from all
# Allow from 127.0.0.1


and thats still there after second installation.

Re: Side bar on the nagios home page not working

Posted: Tue Sep 15, 2015 12:04 pm
by sinkak
this was all because of cache.
solved.
Please close this post.

Thank You