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

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...