Is it possible to create sink with timestamp filter condition to get old logs of particular period

153 views
Skip to first unread message

jurdy george

unread,
May 2, 2020, 10:58:55 AM5/2/20
to Google Cloud Pub/Sub Discussions
Hi 

We need to get old logs of a particular period from stack driver to Pub/Sub topic. 

Is it possible to provide timestamp based filter conditions in sink and get the old log data in pub/sub topic. 

I created a sink with filter timestamp > [start date] AND timestamp < [end date] but no logs are appearing in topic when pulling with subscription. 

thanks,
Jurdy

Nicholas Elkaim

unread,
May 4, 2020, 3:16:47 PM5/4/20
to Google Cloud Pub/Sub Discussions
Hi Jurdy,

Logging sinks only take into account new logs written to Logging (or not written in this case). As a log comes in, it considers if it should be written to logging or if it should be exported to a sink destination, and if the log matches the sink filter then it is written to the destination instead of Logging. A sink will not work on older logs. 

Reply all
Reply to author
Forward
0 new messages