Dashboards & Visualizations

How do I search for events under a Splunk Token?

tycarterbk1
New Member

I have the following token value "7FB3A2D9......"
I want to view events submitted under this token.
• Number of events
• Details of event

Tags (2)
0 Karma

lucasfbeinjamin
Path Finder

Hey buddy @tycarterbk1
I do not know if it's exactly what you wanted but I tried to answer you through an example code, hope you can approve and learn something from it.

<form>
<row>
    <panel>
      <input type="dropdown" token="YOUR_TOKEN" searchWhenChanged="true">
        <fieldForLabel>your_field</fieldForLabel>
        <fieldForValue>your_field</fieldForValue>
        <search>
          <query>index=YOUR_INDEX sourcetype=YOUR_SOURCETYPE
| dedup field1
| table field1</query>  <!--(I'm doing that to populate the dropdown)-->
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <default>7FB3A2D9</default> <!-- Here i set a default value to the dropdown-->
      </input>

  <!-- SEARCH 1 -->
  <row>
    <panel>
      <chart>
        <search>
          <query>index=YOUR_INDEX sourcetype=YOUR_SOURCETYPE $YOUR_TOKEN$ 
| stats count() by id <!--(Here you can count your events by anything you need "id, code, etc...")-->
</query>
        </search>
      </chart>
    </panel>
  </row>

  <!-- SEARCH 2 -->
  <row>
    <panel>
      <chart>
        <search>
          <query>index=YOUR_INDEX sourcetype=YOUR_SOURCETYPE $YOUR_TOKEN$ 
| table Field1, Field2, Field3 .... <!--(Here you put your fields that you need)-->
          </query>
        </search>
        </chart>
     </panel>
   </row>
</form>
0 Karma

lucasfbeinjamin
Path Finder

Hey @tycarterbk1
Please i need more information about your query to be able to respond in the best possible way.

0 Karma

tycarterbk1
New Member

Hi @lucasfbeinjamin
I have a following token value "7FB3A2D9......"
The user wants to see • Number of events and • Details of event associated with this token.
Does this clear things up?
I do not have a query thats what I'm trying to figure out now

0 Karma

mstjohn_splunk
Splunk Employee
Splunk Employee

hi @tycarterbk1

Thanks for posting. Could you give us some more context for your query? You have a much better chance of getting your question answered if you provide more information about your issue. Plus, it will help guide future community users who are facing a similar problem.

0 Karma

tycarterbk1
New Member

Hi @mstjohn_splunk
I have a following token value "7FB3A2D9......"
The user wants to see • Number of events and • Details of event associated with this token.

Does this clear things up?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...