Re: [Nagios-users] NagVis Apache Help
You need to modify the file /etc:nagvis/nagvis.ini.php Put this : ; path options [paths] ; absolute physical NagVis path base="/usr/share/nagvis/" ; absolute html NagVis path htmlbase="/nagios3/nagvis" ; absolute html NagVis cgi path htmlcgi="/nagios3/cgi-bin" David Ribeiro De: "Andrew Fay" À: "Nagios Users List" Envoyé: Jeudi 6 Janvier 2011 15:53:31 Objet: [Nagios-users] NagVis Apache Help hi, I have nagios3 and a copy of nagvis running on an ubuntu box.. when I click on a host in Nagvis I get : The requested URL /nagios/cgi-bin/status.cgi was not found on this server. http://server/nagios/cgi-bin/status.cgi?host=localhost it should be http://server/nagios3/cgi-bin/status.cgi?host=localhost Basically The CGI's work for standard Nagios but not for NagVis, so how can I tell NagVis where to look for the CGI's? This is the apache cfg for nagvis : # NagVis Apache2 sample configuration file # # # Alias /nagvis "/etc/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 /etc/nagios3/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. 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] Nagios apache config : # apache configuration for nagios 3.x # note to users of nagios 1.x and 2.x: # throughout this file are commented out sections which preserve # backwards compatibility with bookmarks/config for older nagios versios. # simply look for lines following "nagios 1.x:" and "nagios 2.x" comments. ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3 ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3 # nagios 1.x: #ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios3 #ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios3 # nagios 2.x: #ScriptAlias /cgi-bin/nagios2 /usr/lib/cgi-bin/nagios3 #ScriptAlias /nagios2/cgi-bin /usr/lib/cgi-bin/nagios3 # Where the stylesheets (config files) reside Alias /nagios3/stylesheets /etc/nagios3/stylesheets # nagios 1.x: #Alias /nagios/stylesheets /etc/nagios3/stylesheets # nagios 2.x: #Alias /nagios2/stylesheets /etc/nagios3/stylesheets # Where the HTML pages live Alias /nagios3 /usr/share/nagios3/htdocs # nagios 2.x: #Alias /nagios2 /usr/share/nagios3/htdocs # nagios 1.x: #Alias /nagios /usr/share/nagios3/htdocs Options FollowSymLinks DirectoryIndex index.php AllowOverride AuthConfig Order Allow,Deny Allow From All AuthName "Nagios Access" AuthType Basic AuthUserFile /etc/nagios3/htpasswd.users # nagios 1.x: #AuthUserFile /etc/nagios/htpasswd.users require valid-user # Enable this ScriptAlias if you want to enable the grouplist patch. # See http://apan.sourceforge.net/download.html for more info # It allows you to see a clickable list of all hostgroups in the # left pane of the Nagios web interface # XXX This is not tested for nagios 2.x use at your own peril #ScriptAlias /nagios3/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi # nagios 1.x: #ScriptAlias /nagios/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi Thanks --- Andrew Disclaimer statement by ABERDEEN JOURNALS LTD - 6/1/2011 The information or images contained within this e-mail are
Re: [Nagios-users] NagVis Apache Help
It's actually not an Apache setting at all, but a NagVis one. In your nagvis.ini.php file, look for this section: ; absolute html NagVis cgi path ; htmlcgi="/nagios/cgi-bin" Uncomment the htmlcgi setting (remove the semicolon), and change the path to fit what you need. -- Tony Yarusso Technical Team ___ Nagios Enterprises, LLC Email: tyaru...@nagios.com Web:www.nagios.com -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] NagVis Apache Help
hi, I have nagios3 and a copy of nagvis running on an ubuntu box.. when I click on a host in Nagvis I get : The requested URL /nagios/cgi-bin/status.cgi was not found on this server. http://server/nagios/cgi-bin/status.cgi?host=localhost it should be http://server/nagios3/cgi-bin/status.cgi?host=localhost Basically The CGI's work for standard Nagios but not for NagVis, so how can I tell NagVis where to look for the CGI's? This is the apache cfg for nagvis : # NagVis Apache2 sample configuration file # # # Alias /nagvis "/etc/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 /etc/nagios3/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. 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] Nagios apache config : # apache configuration for nagios 3.x # note to users of nagios 1.x and 2.x: # throughout this file are commented out sections which preserve # backwards compatibility with bookmarks/config for older nagios versios. # simply look for lines following "nagios 1.x:" and "nagios 2.x" comments. ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3 ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3 # nagios 1.x: #ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios3 #ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios3 # nagios 2.x: #ScriptAlias /cgi-bin/nagios2 /usr/lib/cgi-bin/nagios3 #ScriptAlias /nagios2/cgi-bin /usr/lib/cgi-bin/nagios3 # Where the stylesheets (config files) reside Alias /nagios3/stylesheets /etc/nagios3/stylesheets # nagios 1.x: #Alias /nagios/stylesheets /etc/nagios3/stylesheets # nagios 2.x: #Alias /nagios2/stylesheets /etc/nagios3/stylesheets # Where the HTML pages live Alias /nagios3 /usr/share/nagios3/htdocs # nagios 2.x: #Alias /nagios2 /usr/share/nagios3/htdocs # nagios 1.x: #Alias /nagios /usr/share/nagios3/htdocs Options FollowSymLinks DirectoryIndex index.php AllowOverride AuthConfig Order Allow,Deny Allow From All AuthName "Nagios Access" AuthType Basic AuthUserFile /etc/nagios3/htpasswd.users # nagios 1.x: #AuthUserFile /etc/nagios/htpasswd.users require valid-user # Enable this ScriptAlias if you want to enable the grouplist patch. # See http://apan.sourceforge.net/download.html for more info # It allows you to see a clickable list of all hostgroups in the # left pane of the Nagios web interface # XXX This is not tested for nagios 2.x use at your own peril #ScriptAlias /nagios3/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi # nagios 1.x: #ScriptAlias /nagios/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi Thanks --- Andrew Disclaimer statement by ABERDEEN JOURNALS LTD - 6/1/2011 The information or images contained within this e-mail are of a confidential nature. If you are not the intended recipient please forward it to badm...@ajl.co.uk and delete the message from your system. Opinions, conclusions and other information in this message that do not relate to the official business of Aberdeen Journals Ltd shall be understood as neither given nor endorsed