简体   繁体   English

如何按给定日期范围的 python 中的时间戳过滤 GCP 堆栈驱动程序日志

[英]How to filter GCP stackdriver logs by timestamp from python for given Date range

FILTER = ' timestamp > "2021-04-15T01:00:00Z" AND timestamp < "2021-04-20T01:00:00Z" ' FILTER = ' 时间戳 > "2021-04-15T01:00:00Z" AND 时间戳 < "2021-04-20T01:00:00Z" '

this filter wonn't work for given date range, what can be the possible FILTER in python that can fetch logs within the given datetime range此过滤器不适用于给定的日期范围,python 中可能的 FILTER 可以在给定的日期时间范围内获取日志

Instead FILTER = ' timestamp > "2021-04-15T01:00:00Z" AND timestamp < "2021-04-20T01:00:00Z而是 FILTER = ' timestamp > "2021-04-15T01:00:00Z" AND timestamp < "2021-04-20T01:00:00Z

I simply removed "AND" keyword and it worked for me in python.我只是删除了“AND”关键字,它在 python 中对我有用。

FILTER = ' timestamp > "2021-04-15T01:00:00Z" timestamp < "2021-04-20T01:00:00Z FILTER = ' 时间戳 > "2021-04-15T01:00:00Z" 时间戳 < "2021-04-20T01:00:00Z

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过 python 中的时间戳过滤 GCP 堆栈驱动程序日志 - How to filter GCP stackdriver logs by timestamp from python 如何通过 python 脚本获取 gcp stackdriver 日志? - how can I get gcp stackdriver logs via python script? 如何将 map 日期值转换为 Python 中的时间戳范围? - How to map a date value to a timestamp range in Python? 如何使用 to_date 函数过滤数据以从 python 的 sql 查询中的时间戳中过滤 YYYYMM - How to filter data using to_date function to filter YYYYMM from timestamp in sql query from python 如何从GCP上的Stackdriver解析审核日志条目 - How to parse audit log entries from Stackdriver on GCP 从两个系列 python pandas 获取最接近给定时间戳的日期 - Get date that is closest to given timestamp from two series python pandas Python/Pandas:如何生成相对于给定时间戳的月、季度、年等日期范围? - Python/Pandas: how to generate date ranges from month, quarter, year etc relative to a given timestamp? 如何从 StackDriver Logging API 反序列化 App Engine 应用程序日志? - How to deserialize App Engine application logs from StackDriver Logging API? 如何使用 Pandas 从某个时间戳获取 date_range? - How to use Pandas to get date_range from some timestamp? 如何从 gcp projet 导入日志? - How import logs from gcp projet?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM