Reporting

using savedsearch from cli

klee310
Communicator

I'm trying to use the "savedsearch" command in the search-bar on the CLI, but it always returns 0 results. But if I went into the savedsearch.conf file and copy the actual search string out and paste it into the search-bar, results are returned.

Whats up? am I using the savedsearch command improperly?

in the search-bar, I type:
savedsearch klee_test_save

Tags (1)
1 Solution

hazekamp
Builder

Are you specifying a leading pipe?

| savedsearch klee_test_save

View solution in original post

0 Karma

hazekamp
Builder

Are you specifying a leading pipe?

| savedsearch klee_test_save
0 Karma

hazekamp
Builder

You would need to add that syntax to "kel_order_transaction". On a separate note I would recommend checking out macros which is probably more suitable for your task. It allows you to used saved bits and pieces of search syntax to construct searches.

klee310
Communicator

hi hazedav, thanks for the reply.

Yes you are correct, placing the leading pipe does work.

However, is there any way for me filter down the raw data before passing it to the saved search? For example (and this doesn't work):

AccountNumber=9800257 | savedsearch kel_order_transaction
0 Karma

klee310
Communicator

the reason, i want to use the savedsearch command is because I am trying to construct a faily complex search, and am now placing parts of whats working into a savedsearch first. If this wasn't the case, I could have easily just click on the savedsearch link above the search-bar

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...