Dashboards & Visualizations

How do you set a view in html dashboards to refresh periodically?

sillingworth
Path Finder

I've written a very simple xml dashboard with one single view on it, updating every minute. I've converted it to an html dashboard. It no longer updates every minute.

How do you set views in html dashboards to refresh periodically?

Tags (3)
0 Karma

dineshraj9
Builder

Check the visualization elements created in your HTML view and set the refersh parameter like below -

        // VIEWS: VISUALIZATION ELEMENTS
        //

        var element1 = new TableElement({
            "id": "element1",
            "refresh.auto.interval": "60",
            "managerid": "search1",
            "el": $('#element1')
        }, {tokens: true, tokenNamespace: "submitted"}).render();

        var element2 = new TableElement({
            "id": "element2",
            "refresh.auto.interval": "120",
            "managerid": "search2",
            "el": $('#element2')
        }, {tokens: true, tokenNamespace: "submitted"}).render();
0 Karma

niketn
Legend

Are you on 6.5 or higher and trying to refresh Panel? Can you try dashboard refresh instead?
In the JavaScript section add the following code before DASHBOARD READY comment:

setTimeout("location.reload();",60*1000);

//
// DASHBOARD READY
//
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

sillingworth
Path Finder

Yeah, I'm on 6.5.3 and it was the panel I'd set to refresh. Is your solution going to reload the whole page as though I'd pressed f5, or is it going to go through each panel and update it? Reloading the page means the browser spends several seconds rearranging everything, it's not seemless like panel refreshes.

0 Karma
Get Updates on the Splunk Community!

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...

[Live Demo] Watch SOC transformation in action with the reimagined Splunk Enterprise ...

Overwhelmed SOC? Splunk ES Has Your Back Tool sprawl, alert fatigue, and endless context switching are making ...

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us on ...