Page 1 of 3
Edit nagios navigation bar
Posted: Fri Apr 04, 2014 8:23 am
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.
Re: Edit nagios navigation bar
Posted: Fri Apr 04, 2014 9:15 am
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.
Re: Edit nagios navigation bar
Posted: Mon Apr 07, 2014 1:52 am
by tariqondego
Thanks,let me repost this in the nagios core forum
Re: Edit nagios navigation bar
Posted: Mon Apr 07, 2014 9:27 am
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.
Re: Edit nagios navigation bar
Posted: Tue Apr 08, 2014 8:09 am
by tariqondego
Sorry I had posted already.I am using Core 3.3.1
Re: Edit nagios navigation bar
Posted: Tue Apr 08, 2014 10:44 am
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>
Re: Edit nagios navigation bar
Posted: Thu Apr 10, 2014 2:03 am
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
Re: Edit nagios navigation bar
Posted: Thu Apr 10, 2014 10:54 am
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?
Re: Edit nagios navigation bar
Posted: Mon Apr 14, 2014 2:01 am
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>
Re: Edit nagios navigation bar
Posted: Mon Apr 14, 2014 10:02 am
by abrist
Looks ok. Can you show me what line you added and where in the side.php file?