Reporting

Export a search result automatically to my local c:\

luckyman80
Path Finder

Hi Experts,
I want to insert a Splunk URL into a right click function in my app to open a set of results and save down to the local c:\ I tried the following

transid123 sourcetype="blah" |reverse |outputtext usexml=false | rename _xml as raw | fields raw | fields - _* | outputcsv C:/Temp/results.txt

I get results but a message saying
Could not write to file 'C:/Temp/results.txt': Failed to open file for writing.

Is there a different way to do this ?

0 Karma

somesoni2
Revered Legend

The outputcsv command saves search results to the specified CSV file on the local search head in the $SPLUNK_HOME/var/run/splunk/csv directory. You probably need a custom search command to achieve what you want.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...