Nagios XI 5.5 - new NagVis error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jacek
Posts: 255
Joined: Wed Sep 09, 2015 5:49 am

Nagios XI 5.5 - new NagVis error

Post by jacek »

Hi,
what are the steps after the upgrade to 5.5 to get NagVis up and running?
I didn't change anything and get an error saying:
Unknown value socket used in section worker in main configuration file.
Googling it didn't give me any obvious results, so I thought that maybe there are some post upgrade steps needed to be done (I have no upgrade log due to some issues with my upgrade, so I even can't check if there were some instructions).

PS - if there are any post upgrade instructions shown in the progress window/log can anyone share them with me?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI 5.5 - new NagVis error

Post by tgriep »

Can you post the Nagvis main config file so we can check it's settings?
This is where the config file is located at.

Code: Select all

/usr/local/nagvis/etc/nagvis.ini.php
It could be that there are some settings in the config file that will have to be manually removed to fix the error.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jacek
Posts: 255
Joined: Wed Sep 09, 2015 5:49 am

Re: Nagios XI 5.5 - new NagVis error

Post by jacek »

Here is the file.
I didn't change anything in that file sice the upgrade, so I wonder why it isn't working out of the box?
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI 5.5 - new NagVis error

Post by tgriep »

There is a line in the /usr/local/nagvis/etc/nagvis.ini.php file that needs to be removed.
Edit the file and delete this line.

Code: Select all

socket="unix:/usr/local/nagios/var/rw/live"
Then restart Apache by running

Code: Select all

service httpd restart
Then see if you can Access Nagvis again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jacek
Posts: 255
Joined: Wed Sep 09, 2015 5:49 am

Re: Nagios XI 5.5 - new NagVis error

Post by jacek »

This helped, but the interface is empty (only left and top menu bar).
When I click the demo button on the left I get an error saying:
You are not permitted to access this page (Map/view/).
When I click the "User menu" I have only an info that I'm logged in as my user (named correctly).
And I'm logged in as an admin in XI.

Are there any post update steps that need to be taken?
How can I configure anything when I have no options?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI 5.5 - new NagVis error

Post by tgriep »

Lets manually upgrade Nagvis again and see if starts to function for you.

First, if you have any Nagvis Maps created, back them up first. They are located in this folder.

Code: Select all

/usr/local/nagvis/etc/maps/
Run the following as root to download XI 5.5 so we know that you have a fresh copy.

Code: Select all

cd /tmp
rm -rf nagiosxi xi*.tar.gz
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.5.0.tar.gz
tar xzf xi-latest.tar.gz
cd /tmp/nagiosxi/subcomponents/xicomponents/components/
unzip nagvis.zip
cd /tmp/nagiosxi/subcomponents/xicomponents/components/nagvis
Then edit the upgrade.sh script to comment out the section that checks the version of Naviis so change this from

Code: Select all

if ! grep -q "NagVis 1.5" /usr/local/nagvis/README; then
       echo "You must have NagVis version 1.5.x to automatically upgrade."
       echo "Note: In this situation we recommend installing the latest version of XI"
       echo "on a clean system for best results."
       exit 0
fi
to

Code: Select all

#if ! grep -q "NagVis 1.5" /usr/local/nagvis/README; then
#       echo "You must have NagVis version 1.5.x to automatically upgrade."
#       echo "Note: In this situation we recommend installing the latest version of XI"
#       echo "on a clean system for best results."
#       exit 0
#fi
Save the file and run the upgrade

Code: Select all

./upgrade.sh
Then check this file

Code: Select all

/usr/local/nagvis/etc/nagvis.ini.php
To verify that the logonmodule option is set to the following

Code: Select all

logonmodule="LogonSession"
If not, update it, save the file and restart apache by running

Code: Select all

service httpd restart
After this, see if you can login to the Nagvis GUI.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jacek
Posts: 255
Joined: Wed Sep 09, 2015 5:49 am

Re: Nagios XI 5.5 - new NagVis error

Post by jacek »

Done, I tried to answer the question with "y" but the script skipped the answer.
The configuration file was already OK after the upgrade, but all issues mentioned in my previous post are still valid...

Code: Select all

# ./upgrade.sh
Backing up old NagVis install ...
tar: Removing leading `/' from member names
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.zetup.net
 * epel: ams.edge.kernel.org
 * extras: mirror.netsite.dk
 * updates: mirror.netsite.dk
Package rsync-3.0.6-12.el6.x86_64 already installed and latest version
Nothing to do
| Do you want to update the backend configuration? [n]: Reloading httpd:
NagVis upgraded to 1.9.8-nagios
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI 5.5 - new NagVis error

Post by tgriep »

Not answering Y is normal when the script runs so you can ignore it.

Can you post the Nagvis Apache configuration file to the post so we can view it?
It is this file.
/etc/httpd/conf.d/nagvis.conf


In the section below is what that file should look like.

Code: Select all

# NagVis Apache2 sample configuration file
#
# #############################################################################

Alias /nagvis "/usr/local/nagvis/share"

<Directory "/usr/local/nagvis/share">
  Options FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all

  # To enable Nagios basic auth on NagVis use the following options
  # Just uncomment it. Maybe you need to adjust the path to the
  # Auth user file.
  #
  # If you use the NagVis internal auth mechanism based on the web
  # for you won't need this.
  #
#  #Authname "NagVis Access"
#  ##AuthType Basic
#  ##AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
#  ##Require valid-user
  
  # With installed and enabled mod_rewrite there are several redirections
  # available to fix deprecated and/or wrong urls. None of those rules is
  # mandatory to get NagVis working.
  <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /nagvis
    
    # Use mod_rewrite for old url redirection even if there are php files which
    # redirect the queries itselfs. In some cases the mod_rewrite redirect
    # is better than the php redirect.
    RewriteCond %{REQUEST_URI} ^/nagvis(/index\.php|/|)(\?.*|)$
    RewriteRule ^(index\.php|)(\?.*|)$ /nagvis/frontend/nagvis-js/$1$2 [R=301,L]
    RewriteCond %{REQUEST_URI} ^/nagvis/config\.php.*$
    RewriteRule ^config\.php(.*) /nagvis/frontend/wui/$1 [R=301,L]
    
    # Redirect old regular map links
    RewriteCond %{REQUEST_URI} ^/nagvis/frontend/nagvis-js
    RewriteCond %{QUERY_STRING} map=(.*)
    RewriteRule ^(.*)$ /nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=%1 [R=301,L]

    # Redirect old wui map links
    RewriteCond %{REQUEST_URI} ^/nagvis/frontend/wui
    RewriteCond %{QUERY_STRING} map=(.*)
    RewriteRule ^(.*)$ /nagvis/frontend/wui/index.php?mod=Map&act=edit&show=%1 [R=301,L]

    # Redirect old rotation calls
    RewriteCond %{REQUEST_URI} ^/nagvis/frontend/nagvis-js
    RewriteCond %{QUERY_STRING} !mod
    RewriteCond %{QUERY_STRING} rotation=(.*)
    RewriteRule ^(.*)$ /nagvis/frontend/nagvis-js/index.php?mod=Rotation&act=view&show=%1 [R=301,L]
  </IfModule>
setenv REMOTE_USER nagiosadmin

</Directory>

RewriteEngine   on
RewriteLock     /var/log/rewrite.lck
RewriteLog      /dev/null
RewriteLogLevel 0
RewriteRule     /nagvis/ - [E=REMOTE_USER:nagiosadmin]
If your copy is not the same, edit it, save it and restart Apache by running.

Code: Select all

service httpd restart
Let us know if this fixes the permission problem.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jacek
Posts: 255
Joined: Wed Sep 09, 2015 5:49 am

Re: Nagios XI 5.5 - new NagVis error

Post by jacek »

I found only one difference, my line looked like that:

Code: Select all

RewriteLock     var/log/rewrite.lck
and Yours:

Code: Select all

RewriteLock     /var/log/rewrite.lck
I added the missing slash, restarted apache, but this didn't change anything.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI 5.5 - new NagVis error

Post by lmiltchev »

Let's try to clarify the actual issue. You can log in NagVIs as an admin user, however when you click on the "User menu", the only thing that you see is the "Logged in: <username>" part. You don't see the "Manage Users" and/or "Manage Roles" options. Is this correct?

Have you tried logging out/in Nagios XI as this user, clearing the browser's cache, etc.? Are you having this issue with this particular user ONLY or all admin users?

Start a running tail on the apache error log:

Code: Select all

tail -f /var/log/httpd/error_log
then try accessing the "User menu" in NagVis. In a minute or so, stop the tail by hitting "Ctrl+c", copy/paste the output on the forum.

Is opening a new support ticket via our Support Center an option for you? We may need to schedule a remote session to further troubleshoot this issue. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked