Getting Data In

Is there a way to run search inspector from command line?

woodcock
Esteemed Legend

I am finding that some scripts I use to automate searches are experiencing data fallout due to timeouts AND not reporting this fact (no errors messages nor error codes). So I would like to add the following capability to the script: Capture the job ID for my search in Splunk (I am sure I can figure out how to do this). Once the search completes, launch the job inspector on my search to check if I have any timeouts or other errors before I report my results.

Can this be done?

1 Solution

steveyz
Splunk Employee
Splunk Employee
./splunk show jobs <id>

Also, when you spawn your search job, you could specify the search id to use via the -id option. However, you will have to make sure there are no name collisions.

In addition, if you spawn your job with -detach 1, the CLI will output the search id of the job (but not emit the results, just like if you start a background process in the shell).

View solution in original post

steveyz
Splunk Employee
Splunk Employee
./splunk show jobs <id>

Also, when you spawn your search job, you could specify the search id to use via the -id option. However, you will have to make sure there are no name collisions.

In addition, if you spawn your job with -detach 1, the CLI will output the search id of the job (but not emit the results, just like if you start a background process in the shell).

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...