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

Happy Splunking!
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.

Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...