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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...