Splunk Search

Export search to directory in csv

pmelchiori
Explorer

Hi, I need to export using CLI the Splunk search results. I've created a Windows Custom Search, now I want to export only these results in my csv, how can I do that?

./splunk search "search_name" -maxresults 10000 -format csv > path\file.csv

Why this doesn't work??

Tags (4)
0 Karma
1 Solution

bwooden
Splunk Employee
Splunk Employee

It is true that the free version does not support scheduled searches.

If you would like to generate CSV from a command line. You may want to investigate the outputcsv command.

View solution in original post

0 Karma

bwooden
Splunk Employee
Splunk Employee

It is true that the free version does not support scheduled searches.

If you would like to generate CSV from a command line. You may want to investigate the outputcsv command.

0 Karma

pmelchiori
Explorer

Ok, sorry, I need to schedule an export. The only way that I found with the free license is to schedule a command CLI. So I try to export my customized search. I try:

./splunk search "| savedsearch search_name" -format csv > C:\path\file.csv

I want to know if there are a syntax mistake here, or some other way to schedule an export... thanks

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

please be more clear about what you expect it to do, and what it in fact is doing.

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...