Refine your search:

1
1

I run a report every 24 hours, and I want to make the .csv results file available to multiple users afterwards. Can I configure the report to automatically save it to an alternate location rather than the default $SPLUNK_HOME/var/run/splunk/dispatch/<search_id>/results.csv.gz?

asked 13 Apr '10, 15:31

Mick's gravatar image

Mick ♦
4.0k1327
accept rate: 52%


3 Answers:

do the search via command line and you can specify where it goes, from there you can cron something to put it where ever you want.

The end of the search command can look something like this -

-format csv > "/usr/local/reports/whatever.csv.gz"

link

answered 13 Apr '10, 16:17

jfraiberg's gravatar image

jfraiberg
1518
accept rate: 30%

You can also configure splunk to email those .csv results every day to anyone you want. It's in the saved search, alert actions, email and include results. Or you could trigger the shell script from the saved search-no need to issue command line search.

link

answered 13 Apr '10, 18:11

mayler's gravatar image

mayler
917
accept rate: 0%

In order to send the search results to another location, you can use the search command: outputcsv. Documented at: http://www.splunk.com/base/Documentation/latest/SearchReference/Outputcsv

keeping the saved search artifact for longer in the $SPLUNK_HOME/var/run/splunk/dispatch dir, is done using the dispatch.ttl parameter in the saved search configuration. (It can get a bit complicated if there are actions that are triggered from the search).

See: http://www.splunk.com/base/Documentation/latest/Admin/Savedsearchesconf The default value for keeping the saved searches results is twice the time period.

link

answered 10 Jun '10, 19:12

mzax's gravatar image

mzax ♦
196113
accept rate: 20%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×172
×95
×61
×37

Asked: 13 Apr '10, 15:31

Seen: 1,259 times

Last updated: 10 Jun '10, 19:12

Copyright © 2005-2012 Splunk, Inc. All rights reserved.