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
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...