All Apps and Add-ons

How to host a Splunk dashboard somewhere so that the users can see the dashboard upon clicking a link? It has to has to redirect to splunk and display specific user dashboard ?

vasu0494
New Member

How to host a Splunk dashboard somewhere so that the users can see the dashboard upon clicking a link? It has to has to redirect to splunk and display specific user dashboard ?
In my web browser there are some emails will be displayed when owner clicks on specific email, It has to navigate to splunk URL with email ID as filter parameter and current date filter parameter. So when he redirected to splunk he can see the only User data instead of whole data ?

By using Iframes in html, I can place specific url, but I want that URL should be dynamic by carrying EmailID and current date ?
please help me... thank you

0 Karma

renjith_nair
Legend

@vasu0494,

You could use tokens for that and add the tokens to url as form.token_name.

For e.g.

<form>
  <!--I ALWAYS WANT CURRENT DATE IN THE FILTER AND HENCE SETTING TODAY AS DEFAULT DATE -->
  <search>
    <query>| makeresults|eval today=strftime(_time,"%Y-%m-%d")|fields - _time</query>
    <done>
      <set token="defaut_time">$result.today$</set>
    </done>
  </search>
  <label>TEST</label>
  <fieldset submitButton="false">
    <!--SETTING DATE TOKEN -->
    <input type="text" token="my_date">
      <label>Date</label>
      <default>$defaut_time$</default>
    </input>
    <input type="text" searchWhenChanged="true" token="email">
      <label>Email</label>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <!--USE MY TOKENS -->
        <search>
          <query>index="my_index" email=$email$ date=$default_time$</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="count">10</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
    </panel>
  </row>
</form>

Now we could refer to this dashboard and pass the tokens in the url as

https://MY_SPLUNK_SERVER/en-US/app/search/MY_DASHBOARD_NAME?form.email=CLICKED_EMAIL_FROM_THE_FORM

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

vasu0494
New Member

thank you for your response @renjith.nair . i am naive to splunk, can you Please guide me how can i pass the start and end date parameters in the link and use them in query as well ?

0 Karma

renjith_nair
Legend

Please have a look at http://docs.splunk.com/Documentation/Splunk/7.1.2/Viz/tokens#Define_tokens_for_time_inputs

Let's know if you need any assistance.

---
What goes around comes around. If it helps, hit it with Karma 🙂
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 ...