How do I refresh nagios and stay on the current page?

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?


Rightclick the frame, reload frame

modify your template and put

<a href="#">refresh</a>

You can fix this by adding

header("Cache-Control: max-age=7200, public");

to the beginning of the PHP code section of share/index.php (NOT in the if-clause!).

Your browser does not know if it should cache the current frame, so defaults to not doing so. This causes it to reload to main.php instead. (Appreciated Source in German: https://checkmk.de/lw_nagios_frameset_f5.html)


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)


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.


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>