我的应用程序只能写入 AWS S3 或 Google Cloud Storage。这些应用程序每小时都会生成大量小日志文件。以前,这些日志写入 AWS S3,并将通知发送到 AWS SQS。使用输入类型为 aws-s3 的 Filebeat 并指定queue_url 成功读取 SQS 队列,从 AWS S3 检索日志 (https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input -aws-s3.html#_queue_url).
现在应用程序将日志写入 Google Cloud Storage。如果我使用 Filebeat 类型: gcs (https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-gcs.html) ,Filebeat 会保存每个文件的偏移量(其中数量很大)。如果我为 Google Cloud Storage 中新创建的文件设置通知到 Google Pub/Sub。输入类型的 Filebeat:gcp-pubsub 仅检索通知,而不检索实际日志。
Filebeat中有没有类似SQS的使用Pub/Sub的机制?当然,可以额外配置 DataFlow 将文件内容从 Google Cloud Storage 写入 Google Pub/Sub,但我希望尽可能避免这种情况。
您运行的是哪个版本的 Filebeat?看起来最新版本中的 Beta 功能可能会解决此问题在此处输入链接描述