Getting Data In

how to export search result to my local directories in csv

newsm106
Explorer

Hello guys!!
I am beginner of Splunk.
I want to export search result to my local directories(windows 7) in csv. ( not to $SPLUNK_HOME/var/run/splunk)
Is there solution??
please help me.

Tags (2)
0 Karma
1 Solution

lpolo
Motivator

This is an approach:

1) Create the saved search.
2) Create a python script to call the saved search you created. Then, save the results in csv in the directory you want.
3) Schedule the python script as a script input in Splunk.

I hope it helps.

Lp

View solution in original post

0 Karma

lpolo
Motivator

This is an approach:

1) Create the saved search.
2) Create a python script to call the saved search you created. Then, save the results in csv in the directory you want.
3) Schedule the python script as a script input in Splunk.

I hope it helps.

Lp

0 Karma

somesoni2
Revered Legend

My bad, it is possible through CLI. See the last comment on the accepted answer of below link.

http://answers.splunk.com/answers/42067/can-search-results-be-exported-using-a-command-in-the-search...

0 Karma

newsm106
Explorer

thanks for your answer. but i want to export scheduled search result every day.

0 Karma

somesoni2
Revered Legend

As far as I know this is not possible through any search command or using CLI (output defaults to var/run/splunk). from UI-> Export button your can save it to local disk.

Get Updates on the Splunk Community!

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, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...