Reporting

Adding search time range to outputcsv

pete_charlton
Explorer

I have two searches appended together piped to a table_raw and dumped to an outputcsv and run this as a nightly report. The report is set to run at midnight and capture the previous 24hours of data. Is there a way to put the search time into the outputcsv file to use for auditing purposes?

Search example

index=index1 source=log1 "string of text" "string of text" | append [search index=index2 source=log2 Field=value] | table _raw | outputcsv filename.csv

Tags (1)
0 Karma

yannK
Splunk Employee
Splunk Employee

You can add the command at the end | addinfo | table _raw info_*

it will add to each event the field : info_max_time info_min_time info_search_time info_sid from time search details in epoch time.

example :

alt text

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...