Reporting

How to schedule a daily search that appends new results as a separate column per day and export as an Excel sheet?

anuradhaschauha
New Member

Hi,

I have the following query:

index=src | stats count by message

which gives me results as

message    count 
a1         10
a2         40

I want to run this query everyday and the results should be appended as a separate column per day as

message    count     count2
a1         10        23
a2         40        45

and I want the results to be in an excel sheet daily. Is it possible to do so in Splunk ?

thanks
pks

0 Karma

HiroshiSatoh
Champion

How to process a pivot table of EXCEL data that was exported You?

(search)
index=src| eval Date=strftime(_time, "%Y-%m-%d")|stats count by Date,message
(Result)
Date message count
2014-10-1 a1 10
2014-10-1 a2 40
2014-10-2 a1 23

2014-10-2 a2 45

(export csv)
Date message count
2014-10-1, a1, 10
2014-10-1, a2, 40
2014-10-2, a1, 23

2014-10-2, a2, 45

(EXECL PIVOT TABLE)
Line : message
Column : Date

Value : count

message |2014-10-1 |2014-10-2
a1 |10 | 23
a2 |40 |45

0 Karma

aljohnson_splun
Splunk Employee
Splunk Employee

You might benefit the app for Excel Export

https://apps.splunk.com/app/760/#/documentation

You might also benefit from using the outputcsv command

http://docs.splunk.com/Documentation/Splunk/6.1.4/SearchReference/Outputcsv

0 Karma
Get Updates on the Splunk Community!

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

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...