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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...