Splunk Search

How to dynamically search logs with terms like "error" or "exception"?

rajgowd1
Communicator

HI,
i have logs written by Tomcat application
i have a table which displays time, environment, applicationame, and log info details. These are displayed based on drop-down values.

but if i want to search for particular search term like error, exception, out of memory, oserror and more, I need to pass these search terms dynamically. is there a query we can write for this?

0 Karma
1 Solution

sundareshr
Legend

You need to use tokens in your SPL to filter based on user entry. Here's some documentation to get you started

http://docs.splunk.com/Documentation/Splunk/6.5.1/Viz/tokens#Define_tokens_for_form_inputs

View solution in original post

0 Karma

sundareshr
Legend

You need to use tokens in your SPL to filter based on user entry. Here's some documentation to get you started

http://docs.splunk.com/Documentation/Splunk/6.5.1/Viz/tokens#Define_tokens_for_form_inputs

0 Karma

rajgowd1
Communicator

Thank you,i am going through the document.

some how i am not seeing Accept button.any idea on this. or
is there any issue from my side

0 Karma

rajgowd1
Communicator

Yes,i see it now. and i just implemented Token in SPL and its working now.
may i know what is the issue with Accept button

0 Karma

sundareshr
Legend

At first, I had posted as a comment. Comments don't have accept. Then I changed to answer.

0 Karma

rajgowd1
Communicator

Hi,
will i get both error info and events i search like below

index=myindex java.lang.stringindexoutofboundsexception OR out of memory

0 Karma

rajgowd1
Communicator

i think this is working,i just tested

index=myindex java.lang.stringindexoutofboundsexception OR (out of memory)

0 Karma

sundareshr
Legend

You should see the accept button now.

0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...