Splunk Search

Removing a Pattern from the search result

jaiarchi
New Member

I am searching for a string "xyz" that would result in all actionsteps (with counts) that has "xyz" in it, However I want to remove any string that ends with xyz_I or xyz_S.

Would someone be able to help me on this please.

0 Karma

woodcock
Esteemed Legend

Show us the sample events and indicate the ones to keep and the ones not to keep (calling out field names/values).

0 Karma

gcusello
SplunkTrust
SplunkTrust

HI jaiarchi,
If I correctly understood: do you want to have all events where there is the string xyz but not the ones where there are xyz_I or xyz_S?
if this is your requirement you have to insert in your search:

your_search "xyz" NOT ("xyz_I" OR "xyz_S") | ...

Bye.
Giuseppe

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Hi Jaiarchi, some more details needed.. what is ur current search query, some sample log lines..

maybe try this one -
Index=indexName xyz NOT (xyz_I OR xyz_S)

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

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 ...