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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Deprecation of Splunk Observability Kubernetes “Classic Navigator” UI starting ...

Access to Splunk Observability Kubernetes “Classic Navigator” UI will no longer be available starting January ...