Splunk Search

Pleasse help me with IF then ELSE condition in search query

ankitgupta1700
New Member

If my search result has any count I want to append my search with OUTPUTCSV command else null.

Something like if Job.resultCount > 0 add Outputcsv command to query else null.

Tags (3)
0 Karma

cmerriman
Super Champion

will something like this work:

| appendpipe [ stats count | where count==0 |outputcsv]
0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...