Other Usage

Search results of savedsearch displaying multiple times using search command in CLI

rajyah
Communicator

Hi everyone,

Screenshot of issue:

SplunkCommunityHelp.PNG

 

 

 

 

 

Here are my setup with my current issue:

  • I'm running this search in a clustered environment
  • I'm running Splunk 8.0.5
  • Using search command in CLI
  • Running search command to display results of savedsearch 

Attached below is the search command in CLI I used:

/opt/splunk/bin/splunk search "|savedsearch TestReport" -maxout 0 -auth test:test

 

Additionally, below is the content of such savedsearch:

index=myindex(sourcetype=sourcetype1 OR sourcetype=sourcetype2) _index_earliest="01/17/2020:22:00:00" _index_latest="01/17/2020:22:59:00" | stats count

 

I need the search result of CLI to display once since I'm using its content to populate another csv which I will use for another purpose.

 

Kindly let me know if there is something that I need to reconfigure in my environment. Thank you!

 

Regards,

Raj

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

There is an option that disables preview.

/opt/splunk/bin/splunk search "|savedsearch TestReport" -maxout 0 -auth test:test -preview false
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...