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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...