Splunk Search

How to edit my search to filter out a certain result?

yzimmer
New Member

Hi everybody!

In a Splunk Dashboard, I created a Bar Panel with this:

* | stats count(U*) as U* | transpose | rename column AS Property "row 1" AS Count | SORT -Count

That's works fine! But I don't want to have the Property "U8_DOCUMENTTITLE" in my result....

So I have to change that:

stats count(U*) as U*

How can I ask "U* without U8_DOCUMENTTITLE" ?

Thanks to help me 😉

0 Karma
1 Solution

ryanoconnor
Builder

can you exclude anything that that field in your first search term?

 * NOT U8_DOCUMENTTITLE=* | stats count(U*) as U* | transpose | rename column AS Property "row 1" AS Count | SORT -Count

Or exclude it in the middle:

 * | stats count(U*) as U* | transpose |search column!=U8_DOCUMENTTITLE |rename column AS Property "row 1" AS Count | SORT -Count

View solution in original post

sundareshr
Legend

Try this

 * | stats count(U*) as U* | transpose | rename column AS Property "row 1" AS Count | SORT -Count | search Property !="U8_DOCUMENTTITLE"
0 Karma

yzimmer
New Member

Hi Sundareshr!

Thanks for your answer, that 's work too, but Ryan was so fast 😉

Have a good day!

0 Karma

ryanoconnor
Builder

can you exclude anything that that field in your first search term?

 * NOT U8_DOCUMENTTITLE=* | stats count(U*) as U* | transpose | rename column AS Property "row 1" AS Count | SORT -Count

Or exclude it in the middle:

 * | stats count(U*) as U* | transpose |search column!=U8_DOCUMENTTITLE |rename column AS Property "row 1" AS Count | SORT -Count

yzimmer
New Member

Hi Ryan!
Thanks a lot for your answer!
This code doesn't work:

* NOT U8_DOCUMENTTITLE=*

But this code works perfectly :

search column!=U1708_DOCUMENTTITLE

Thanks for your help!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...