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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...