Splunk Search

Execute a Search if the condition is met else not

jugalkinariwala
Explorer

Hi Splunkers,

 

I am writing on SPL in the report which has lookup. And if the lookup has less number of rows then overwrite the lookup with existing static lookup.

 

Example:

<myseach>
| outputlookup test1.csv
| stats count
| < if/where condition , where i need to check if the count < 100 , then overwrite existing static lookup into test1.csv else remain as-is"
                         count < 100 , "| inputlookup testlookup.csv | outputlookup test1.csv" , "test1.csv" 


Labels (1)
0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...