How to refresh nagios and stay on the current page

nagios

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?

Best Answer

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)