Vshell how to auto "refresh data"

Information and discussions relating to the Nagios V-Shell web interface.

Vshell how to auto "refresh data"

Postby junior_duda » Mon Mar 04, 2013 11:51 am

Hi, I would like the Services screen do an auto refresh without need to click on Refresh Data, like Nagios Core do every 90 seconds!
junior_duda
 
Posts: 3
Joined: Mon Mar 04, 2013 11:48 am

Re: Vshell how to auto "refresh data"

Postby mguthrie » Mon Mar 11, 2013 2:21 pm

If you add the following line to index.php (around line 50), your content will refresh at whatever rate you specify.

Code: Select all
header('Refresh: 30;');
mguthrie
 
Posts: 4384
Joined: Mon Jun 14, 2010 10:21 am

Re: Vshell how to auto "refresh data"

Postby junior_duda » Mon Mar 18, 2013 9:41 am

Thanks mguthrie, now my page is refreshing ten in ten minutes!
junior_duda
 
Posts: 3
Joined: Mon Mar 04, 2013 11:48 am

Re: Vshell how to auto "refresh data"

Postby nagtech2 » Tue Dec 17, 2013 4:01 pm

mguthrie wrote:If you add the following line to index.php (around line 50), your content will refresh at whatever rate you specify.

Code: Select all
header('Refresh: 30;');


Is there another way to accomplish this without having all pages automatically refresh?, It's refreshing when viewing viewing configuration on hosts.

Thanks
nagtech2
 
Posts: 30
Joined: Tue Dec 17, 2013 2:09 pm

Re: Vshell how to auto "refresh data"

Postby tmcdonald » Tue Dec 17, 2013 4:18 pm

You would need to write some logic to detect which page you are on and only refresh for that page.

Also this thread is 9 months old and the original question was answered, so I will be locking this thread now. If you have a question please start a new thread.
Former Nagios employee
tmcdonald
 
Posts: 9118
Joined: Mon Sep 23, 2013 8:40 am


Return to Nagios V-Shell

Who is online

Users browsing this forum: No registered users and 1 guest