Edit nagios navigation bar

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
tariqondego
Posts: 85
Joined: Fri Mar 28, 2014 6:18 am

Edit nagios navigation bar

Post by tariqondego »

I would like to add a link to a nagvis rotation pool on the side navigation bar on nagios.How can I go about this,I have looked at the /usr/local/nagios/share/side.html file but I see no option to do this.

Please advise.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Edit nagios navigation bar

Post by tmcdonald »

tariqondego wrote:I have looked at the /usr/local/nagios/share/side.html file but I see no option to do this.
Just to confirm, are you looking to do this in nagios or Nagios XI? You are posting in the XI section, but referencing nagios files.
Former Nagios employee
tariqondego
Posts: 85
Joined: Fri Mar 28, 2014 6:18 am

Re: Edit nagios navigation bar

Post by tariqondego »

Thanks,let me repost this in the nagios core forum
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Edit nagios navigation bar

Post by tmcdonald »

tariqondego wrote:Thanks,let me repost this in the nagios core forum
There is no need for that. I will simply move this one over. We don't need two threads.

What nagios version are you using? There are some differences between v3 and v4 that deal with how pages are delivered.
Former Nagios employee
tariqondego
Posts: 85
Joined: Fri Mar 28, 2014 6:18 am

Re: Edit nagios navigation bar

Post by tariqondego »

Sorry I had posted already.I am using Core 3.3.1
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Edit nagios navigation bar

Post by abrist »

side.php is the right file to edit. Add an href for your nagvis link to the subcategory of your choice. In order to add it to the top "General" menu, add a line similar to following line in the "General" navsection list:

Change:

Code: Select all

<div class="navsection">
<div class="navsectiontitle">General</div>
<div class="navsectionlinks">
<ul class="navsectionlinks">
<li><a href="main.php" target="<?php echo $link_target;?>">Home</a></li>
<li><a href="http://go.nagios.com/nagioscore/docs" target="_blank">Documentation</a></li>
</ul>
</div>
</div>
To:

Code: Select all

<div class="navsection">
<div class="navsectiontitle">General</div>
<div class="navsectionlinks">
<ul class="navsectionlinks">
<li><a href="main.php" target="<?php echo $link_target;?>">Home</a></li>
<li><a href="http://go.nagios.com/nagioscore/docs" target="_blank">Documentation</a></li>
<li><a href="http://<your awesome url>" target="_blank">Your awesome link text</a></li>
</ul>
</div>
</div>
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
tariqondego
Posts: 85
Joined: Fri Mar 28, 2014 6:18 am

Re: Edit nagios navigation bar

Post by tariqondego »

Thanks,for shading much light on this.But I have just edited /usr/local/nagios/share/side.php but when I refresh the nagios page the menu remains the same.
I have done a search of the side.php and there seems to be several copies of this file on different directories.
/software/Nagios/nagios/html/side.php
/software/ngconfigs/share/side.php

Am I editing the wrong file?

Please advise
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Edit nagios navigation bar

Post by abrist »

Edit whichever one is being served by apache. Both of those locations are unfamiliar to me, so they must be custom prefixes that you configured during compilation/install. what does your apache vhost config for nagios look like?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
tariqondego
Posts: 85
Joined: Fri Mar 28, 2014 6:18 am

Re: Edit nagios navigation bar

Post by tariqondego »

Below is the config for nagios,this means i am editing the correct file,but still it does not reflect on browser,a restart of nagios and apache has not helped either.

Code: Select all

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Edit nagios navigation bar

Post by abrist »

Looks ok. Can you show me what line you added and where in the side.php file?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked