Splunk Search

limiting columns of statistics table and search within

jdepp
Path Finder

I am trying to create a panel with a statistics table to render the results of a search and only want specific fields to display & I am not sure how to reduce the search string to do that. Also is it possible to create a search within the table itself to search if a value is present for a specific value in that table.

sourcetype="data.newIndex.stats" clientId="100"

this produces a table with 6 column fields: Column A, Column B, Column C, Column D, Column E. I only want to display the values Column A, Column B and also allow a user to search for a value within column A from within the panel.

Tags (1)
0 Karma

vasanthmss
Motivator

Hi,

you can select what are all the fields required to display in your table using fields command. for more read this Doc

sourcetype="data.newIndex.stats" clientId="100" | fields ColumnA, ColumnB ....

coming back to your second query, search by Column A: you can use the inputtype to define the list of Column A values and user can choose any of the values. More details read this Doc

it will be,

  1. Define your available list of Column A values in a dropdown by writing one search like, [sourcetype=.... clientId="100" | stats count by ColumnA]. here you can mention label field and value field from your query(here both are ColumnA). user selection will be hold by a token. say for example your token name is "columnA" that holds the user selection.
  2. Your search query will take the token as input and will return the results as per user selection. like [sourcetype=... clientid="100" ColumnA="$columnA$" | fields columnA, columnB]

Accept this answer if its helpful to you.

Cheers!

V
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...