Nagvis URL not found

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagvis URL not found

Post by lmiltchev »

After running the script, can you log in NagVis directly (not from the Nagios XI web UI)?

Code: Select all

http://ip address/nagvis
Run the following commands and show us the output:

Code: Select all

ll /usr/local/nagvis
ll /usr/local/nagiosxi/html/includes/components/nagvis/
Is a remote session an option for you? We may need to move this to our email ticketing system and schedule a remote session to further troubleshoot the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagvis URL not found

Post by emartine »

URL not found.



ll /usr/local/nagvis
ls: cannot access /usr/local/nagvis: No such file or directory


ll /usr/local/nagiosxi/html/includes/components/nagvis/
total 24
-rwxr-xr-x 1 nagios nagios 1900 Jul 8 13:29 add_map_links.inc.php
-rwxr-xr-x 1 nagios nagios 80 Jul 8 13:29 CHANGES.txt
-rwxr-xr-x 1 nagios nagios 5861 Jul 8 13:29 install.sh
-rwxr-xr-x 1 nagios nagios 3327 Jul 8 13:29 nagvis.inc.php
-rwxr-xr-x 1 nagios nagios 596 Jul 8 13:29 sanity.sh
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagvis URL not found

Post by tgriep »

I went through the install script and condensed it for you. Run the commands below and it should restore Nagvis. Any errors, post them here.

Code: Select all

cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/packages/nagvis-1.5.9.tar.gz
tar zxf nagvis-1.5.9.tar.gz
cd nagvis-1.5.9
chmod +x install.sh
./install.sh -b /usr/bin -p /usr/local/nagvis -W /nagvis -u apache -g apache -w /etc/httpd/conf.d -i ndo2db -a y -q
cd ..
rm -rf /tmp/nagvis-1.5.9
wget http://assets.nagios.com/downloads/nagiosxi/scripts/NagiosXI-Nagvis-adjust_config.py
chmod +x NagiosXI-Nagvis-adjust_config.py
./NagiosXI-Nagvis-adjust_config.py --mode XI
rm NagiosXI-Nagvis-adjust_config.py

sed -i 's/status.cgi/status.php/' /usr/local/nagvis/etc/automaps/__automap.cfg
sed -i 's/#AuthName/AuthName/' /etc/httpd/conf.d/nagvis.conf
sed -i 's/#AuthType/AuthType/' /etc/httpd/conf.d/nagvis.conf
sed -i 's/#AuthUserFile/AuthUserFile/' /etc/httpd/conf.d/nagvis.conf
sed -i 's%AuthUserFile.*%AuthUserFile\ /usr/local/nagiosxi/etc/htpasswd.users%' /etc/httpd/conf.d/nagvis.conf
sed -i 's/#Require/Require/' /etc/httpd/conf.d/nagvis.conf

service httpd reload
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagvis URL not found

Post by emartine »

[root@ ~]# cd /tmp
[root@ tmp]# wget http://assets.nagios.com/downloads/nagi ... 5.9.tar.gz
--2015-07-09 16:32:40-- http://assets.nagios.com/downloads/nagi ... 5.9.tar.gz
Resolving assets.nagios.com... 72.14.181.71
Connecting to assets.nagios.com|72.14.181.71|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://assets.nagios.com/downloads/nag ... 5.9.tar.gz [following]
--2015-07-09 16:32:40-- https://assets.nagios.com/downloads/nag ... 5.9.tar.gz
Connecting to assets.nagios.com|72.14.181.71|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3298253 (3.1M) [application/x-gzip]
Saving to: “nagvis-1.5.9.tar.gz.1”

100%[======================================>] 3,298,253 8.69M/s in 0.4s

2015-07-09 16:32:40 (8.69 MB/s) - “nagvis-1.5.9.tar.gz.1” saved [3298253/3298253]

[root@ tmp]# tar zxf nagvis-1.5.9.tar.gz
[root@ tmp]# cd nagvis-1.5.9
[root@ nagvis-1.5.9]# chmod +x install.sh
[root@ nagvis-1.5.9]# ls
ChangeLog etc install.log LICENCE share
docs INSTALL install.sh README uifx
[root@ nagvis-1.5.9]# ./install.sh -b /usr/bin -p /usr/local/nagvis -W /nagvis -u apache -g apache -w /etc/httpd/conf.d -i ndo2db -a y -q
[root@ nagvis-1.5.9]# cd ..
[root@ tmp]# rm -rf /tmp/nagvis-1.5.9
[root@ tmp]# wget http://assets.nagios.com/downloads/nagi ... _config.py
--2015-07-09 16:33:31-- http://assets.nagios.com/downloads/nagi ... _config.py
Resolving assets.nagios.com... 72.14.181.71
Connecting to assets.nagios.com|72.14.181.71|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://assets.nagios.com/downloads/nag ... _config.py [following]
--2015-07-09 16:33:31-- https://assets.nagios.com/downloads/nag ... _config.py
Connecting to assets.nagios.com|72.14.181.71|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7726 (7.5K) [text/plain]
Saving to: “NagiosXI-Nagvis-adjust_config.py”

100%[======================================>] 7,726 --.-K/s in 0s

2015-07-09 16:33:32 (111 MB/s) - “NagiosXI-Nagvis-adjust_config.py” saved [7726/7726]

[root@ tmp]# chmod +x NagiosXI-Nagvis-adjust_config.py
[root@ tmp]# ./NagiosXI-Nagvis-adjust_config.py --mode XI
Updated Nagvis config.
Patched template files.
Adjustment completed!
[root@ tmp]# rm NagiosXI-Nagvis-adjust_config.py
rm: remove regular file `NagiosXI-Nagvis-adjust_config.py'? y
[root@ tmp]#

I tried to access the page via the link and got

Not Found

The requested URL /nagvis was not found on this server.

tried accessing it https://<IP>/nagvis

and also received not found.


These files now exist however:
[root@ tmp]# ll /usr/local/nagvis
total 24
drwxrwxr-x 5 apache apache 143 Jul 9 16:33 etc
-rw-rw-r-- 1 apache apache 18182 Apr 18 2011 LICENCE
-rw-rw-r-- 1 apache apache 1537 Apr 18 2011 README
drwxrwxr-x 8 apache apache 117 Jul 9 16:33 share
drwxrwxr-x 3 apache apache 17 Jul 9 16:33 var
[root@ tmp]# ll /usr/local/nagiosxi/html/includes/components/nagvis/
total 24
-rwxr-xr-x 1 nagios nagios 1900 Jul 8 13:29 add_map_links.inc.php
-rwxr-xr-x 1 nagios nagios 80 Jul 8 13:29 CHANGES.txt
-rwxr-xr-x 1 nagios nagios 5861 Jul 8 13:29 install.sh
-rwxr-xr-x 1 nagios nagios 3327 Jul 8 13:29 nagvis.inc.php
-rwxr-xr-x 1 nagios nagios 596 Jul 8 13:29 sanity.sh
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagvis URL not found

Post by tgriep »

I think you forgot this section that was in the code wraps.

Code: Select all

sed -i 's/status.cgi/status.php/' /usr/local/nagvis/etc/automaps/__automap.cfg
sed -i 's/#AuthName/AuthName/' /etc/httpd/conf.d/nagvis.conf
sed -i 's/#AuthType/AuthType/' /etc/httpd/conf.d/nagvis.conf
sed -i 's/#AuthUserFile/AuthUserFile/' /etc/httpd/conf.d/nagvis.conf
sed -i 's%AuthUserFile.*%AuthUserFile\ /usr/local/nagiosxi/etc/htpasswd.users%' /etc/httpd/conf.d/nagvis.conf
sed -i 's/#Require/Require/' /etc/httpd/conf.d/nagvis.conf
service httpd reload
Could you also run this and post back?

Code: Select all

ll /etc/httpd/conf.d
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagvis URL not found

Post by emartine »

excellent. It is now prompting and I can log in.

# ll /etc/httpd/conf.d
total 64
-rw-r--r--. 1 root root 330 Oct 3 2012 mrtg.conf
-rw-r--r--. 1 root root 1010 Jun 26 2014 nagios.conf
-rwxrwxrwx. 1 root root 601 Jun 26 2014 nagiosmobile.conf
-rw-r--r--. 1 root root 427 Feb 25 19:08 nagiosql.conf
-rw-r--r--. 1 root root 639 Jul 1 2014 nagiosxi.conf
-rw-r--r-- 1 apache apache 2148 Jul 13 14:55 nagvis.conf
-rw-r--r--. 1 root root 344 Jun 26 2014 nrdp.conf
-rw-r--r-- 1 root root 674 Oct 23 2014 php.conf
-rw-r--r-- 1 root root 392 Aug 15 2014 README
-rw-r--r-- 1 root root 9958 Aug 5 2014 ssl.conf
-rw-r--r--. 1 root root 9473 Jun 26 2014 ssl.conf.nagiosxibackup
-rw-r--r-- 1 root root 299 Aug 15 2014 welcome.conf
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagvis URL not found

Post by tgriep »

Can we close this post then?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagvis URL not found

Post by emartine »

I receive the error.

The required graphviz binary "dot" could not be found in the paths: "/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin/".
Looks like it is missing the graphviz package.
Where should I get this one from?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Nagvis URL not found

Post by jdalrymple »

You should be able to just `yum -y install graphviz` provided you haven't fiddled with your yum repos.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagvis URL not found

Post by tgriep »

You will have to reinstall the graphviz-gd package too.

Code: Select all

 yum reinstall graphviz-gd
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked