Dashboards & Visualizations

How to use a scheduled report in an HTML panel?

daniel333
Builder

All,

I have a set of HTML here that is running a search inline and I would rather used a scheduled report.

        <div id="globe_search" class="splunk-manager" data-require="splunkjs/mvc/searchmanager" data-options='{
          "search": "(index=apache* OR index=jbossweb) src_ip=* | iplocation src_ip | table clientip, src_ip, lon, lat",
          "preview": true,
          "earliest_time": "-1m@m",
          "latest_time": "now" 
         }'>
        </div>

However, when I look at an example of using a scheduled report, it really doesn't add up.The language seems very different. How do I go about using the report from below in my panel from above?

        new SavedSearchManager({
            "id": "search1",
            "searchname": "report_iphits",
            "cache": "scheduled",
            "cancelOnUnload": true,
            "status_buckets": 0,
            "app": utils.getCurrentApp(),
            "auto_cancel": 90,
            "preview": true,
            "runWhenTimeIsUndefined": false
        }, {tokens: true, tokenNamespace: "submitted"});

Thanks in advance,

0 Karma

somesoni2
Revered Legend

Give this a try

<div id="globe_search" class="splunk-manager" data-require="splunkjs/mvc/searchmanager" data-options='{
           "search": "| savedsearch report_iphits",
           "preview": true,
           "earliest_time": "-1m@m",
           "latest_time": "now" 
          }'>
         </div>
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...