Splunk Search

excluding a field value from a same events

rajiv_r
Explorer

How can i exclude a single value from a field which generates multiple value in the single event.
for eg- if in a single event there are two values for the same field - user.purchase="TRUE" and user.purchase="False". If i have to exclude user.purchase="False' and need to display only user.purchase= " True" how can i do it.
I have already tried search user.purchase != "False" --- It dint worked.
I have also tried with NOT operator and Where command but nothing worked out.
Can someone please help me excluding this value

Labels (1)
Tags (1)
0 Karma
1 Solution

to4kawa
Ultra Champion
....
|rex mode=sed field="user.purchase" "s/false//g"

View solution in original post

0 Karma

to4kawa
Ultra Champion
....
|rex mode=sed field="user.purchase" "s/false//g"
0 Karma

rajiv_r
Explorer

Thanks a lot this works

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try "user.purchase" != "false".

---
If this reply helps you, Karma would be appreciated.
0 Karma

rajiv_r
Explorer

I had already tried it..it dint work

0 Karma
Get Updates on the Splunk Community!

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

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...