Splunk Enterprise Security

How to show the destination not in the search table?

Miguel3393
Explorer

Hello,

I have a lookup table with numbers, where it checks the numbers that match the error_code 11.


index="cdrs" "error_code"="11" "Destino"="*"


| lookup DIDREPEP Destino OUTPUT Destino | table Destino

But it shows some blank results because they are not in the lookup table.
How can I do so that it only shows me the destination that is not in the search table?.

thanks greetings.

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

richgalloway
SplunkTrust
SplunkTrust

That's different.  To do that, read the lookup in a subsearch and use NOT in the main search to exclude everything already in the lookup.

index="cdrs" "error_code"="11" "Destino"="*" NOT [ | inputlookup DIDREPEP | fields Destino ]
---
If this reply helps you, Karma would be appreciated.

View solution in original post

Miguel3393
Explorer

Hello,

The search seems to work, but the destination is still not visible in the table

Table Destino.PNG

Regards

0 Karma

richgalloway
SplunkTrust
SplunkTrust

That's what the isnull function does - it keeps results where the specified field has no value (not visible).  As per the OP: " only shows me the destination that is not in the search table".  If this is not what you expected then please clarify the requirements.

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

Miguel3393
Explorer

Thanks for the answers. 

How can I visualize in a table the destinations that are not in the lookup?

Regards.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

That's different.  To do that, read the lookup in a subsearch and use NOT in the main search to exclude everything already in the lookup.

index="cdrs" "error_code"="11" "Destino"="*" NOT [ | inputlookup DIDREPEP | fields Destino ]
---
If this reply helps you, Karma would be appreciated.

richgalloway
SplunkTrust
SplunkTrust

Use the isnull function to filter the results.

| lookup DIDREPEP Destino OUTPUT Destino 
| where isnull(Destino)
| table Destino

 

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...