How to Export Daily log of a saved search


(Eddi Santana) #1

I’m VERY New to GrayLog.
Is it possible to automatically do a Daily save of the Results of a Saved Search?

I need to Rotate Logs at Midnight for a system so it can be exported to an archive.


(Jochen) #2

Yes, you can use the Graylog REST API to export the results of a saved search as CSV.

For this, you have to first retrieve the saved search and the query it contains, then run this query and export these results as CSV.