Splunk Search

earliest or latest time in outputcsv filename

ryastrebov
Communicator

Hello!

I have multiple saved search. Each search covers the period of 12 hours. Accordingly, each search has a earliest time and latest time. The results of each search are uploaded to csv.
I would like to name each file contained earliest time of search. It is possible?

Function

| outputcsv [ | stats count | eval filename=strftime(now(), "filename_%d_%m_%y_%H_%M_%S") | return $filename]

return filename, contains current time when search is started.
But I do not know how to enter in the name of the file earliest time.

Tell me, is it possible to do this and if so, how?

1 Solution

kurdbahr
Path Finder

How about this?


| outputcsv [ | stats count | addinfo | eval filename=strftime(info_min_time, "filename_%d_%m_%y_%H_%M_%S") | return $filename]

View solution in original post

kurdbahr
Path Finder

How about this?


| outputcsv [ | stats count | addinfo | eval filename=strftime(info_min_time, "filename_%d_%m_%y_%H_%M_%S") | return $filename]

Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...