Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Ever since I updated to nagios 3.2.1 from 3.0.6 I can no longer refresh any status pages. When I refresh, it just goes back to the "home" page of nagios, forcing me to drill back down to whatever I was looking at. With 3.0.6 I was able to refresh pages just fine to see updated statuses.

Obviously this is related to the way nagios uses a frame to display all the different pages and keep the navigation on the left, and it probably has to do with how nagios hides the full url in the address bar and just shows http://hostname/nagios no matter what page you're on. The change in behavior from 3.0.6 to 3.2 probably has everything to do with the change from html to php files for the left-hand side navigation.

All of these things I know, the question is how do I get it to work how I want it to. Is there some option somewhere that I'm not finding to show the full URL in the address bar or to refresh only the frame?

share|improve this question
add comment

6 Answers

up vote 7 down vote accepted

Rightclick the frame, reload frame

modify your template and put

<a href="#">refresh</a>
share|improve this answer
2  
That does the trick. Adding the refresh link in every page is a bit too much work for my tastes, but hitting alt+f5 instead of f5 is just fine with me. –  Matt Jul 2 '10 at 19:08
3  
it is a single template modification. common-footer.ssi in htdocs/ssi (must be executable, appends to the footer of any cgi generated page) –  karmawhore Jul 2 '10 at 19:20
    
Thanks, the SSI information is the critical piece of information for me. –  Jay Taylor Oct 29 '12 at 21:04
add comment

You can bypass the left side frame and open a status only window.

Try right clicking on the status link you want to refresh and open just that frame in a new window. (that's what I normally do)

share|improve this answer
    
That's already how I have our "dashboard" wall-mounted computer set up, for this question I'm more interested in it while I'm actively moving around and looking at stuff, so I still need the left bar for navigation. –  Matt Jul 2 '10 at 19:07
add comment

I know this may be a little late, but...

It has to do with the frameset page itself now being a php file (instead of html). There is a little bit of php code in that file to handle the "corewindow" parameter/feature. If you do not use that feature, you could remove the block of php code from index.php, change the second frame src attribute to main.php and rename index.php to index.html.

share|improve this answer
3  
A little late indeed! The answer now would include either hacking into my old employer's network, or convincing my current employer to drop solarwinds in favor of nagios. –  Matt Jun 24 '11 at 5:12
add comment

I solved it by deleting all php code from index.php and placing instead of

<frame src="<?php echo $corewindow;?>" name="main" frameborder="0">

this

<frame src="main.php" name="main" frameborder="0">

and then move index.php to index.html

Here is my index.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

<html>
<head>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<title>Nagios Core</title>
<link rel="shortcut icon" href="images/favicon.ico" type="image/ico">
</head>


<frameset cols="180,*">
<frame src="side.php" name="side" frameborder="0">
<frame src="main.php" name="main" frameborder="0">

<noframes>
<!-- This page requires a web browser which supports frames. -->
<h2>Nagios Core</h2>
<p align="center">
<a href="http://www.nagios.org/">www.nagios.org</a><br>
Copyright &copy; 2010-2011 Nagios Core Development Team and Community Contributors.
Copyright &copy; 1999-2010 Ethan Galstad<br>
</p>
<p>
<i>Note: These pages require a browser which supports frames</i>
</p>
</noframes>

</frameset>

</html>
share|improve this answer
add comment

Arcadius's answer is a good solution that could get adopted by nagios itself. don't know why it's been voted down, apart from missing where reload.png comes from.

for reload.png. cp /usr/share/icons/gnome/32x32/actions/reload.png /usr/share/nagios/images/ reload.png (at this location) comes from gnome-icon-theme (rpm -qf /usr/share/icons/gnome/32x32/actions/reload.png)

there are other sizes available, if you like.

Hiney

share|improve this answer
add comment
  1. Place reload.png into nagios/images, give ≽ 555,
  2. Replace in nagios/index.php:
<frame src="<?php echo $corewindow;?>" name="main" frameborder="0" style="">

.. by

<frame src="<?php echo $corewindow;?>" name="main" frameborder="0" style=""
    onload="this.contentWindow.document.body.innerHTML+='<a href=\'#\' onclick=\'location.reload()\'><img src=\'/nagios/images/reload.png\' alt=\'Refresh\' style=\'position:fixed; top:20px; right:20px; z-index:10000\'></a>'">
share|improve this answer
    
(1) this is SO much more work than any of the other options. (2) I see no reload.png here... –  voretaq7 Nov 11 '13 at 18:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.