简体   繁体   English

我可以配置 GCP ops-agent 以将日志发送到其他项目或将日志发布到 Pub/Sub 主题吗?

[英]Can I configure GCP ops-agent to send logs to other project or publish logs to Pub/Sub topic?

The goal of this context is to achieve a centralized logs storage.此上下文的目标是实现集中式日志存储。 I want all of the logs across different projects to be stored under the same project.我希望跨不同项目的所有日志都存储在同一个项目下。

By far of my experience on the ops-agent, it always sends logs to the corresponding project's log bucket.根据我在 ops-agent 上的经验,它总是将日志发送到相应项目的日志存储桶。 The ops-agent documentation neither provide manual on customizing the log destination. ops-agent 文档既不提供自定义日志目标的手册。

I want to send the logs to a specified log bucket or Pub/Sub topic.我想将日志发送到指定的日志存储桶或 Pub/Sub 主题。 Is it achievable?它可以实现吗?

I think that Log Sinks could help you to achieve what you want.我认为 Log Sinks 可以帮助你实现你想要的。 They are the mecanism to aggregate logs within and Organization.它们是在组织内聚合日志的机制。

Here you can check and example where they do the same with audit logs.在这里,您可以检查并举例说明他们对审计日志执行相同操作的位置。

And here you can find the documentation of how to route logs using sinks. 在这里您可以找到有关如何使用接收器路由日志的文档。

With sinks you can use several destinations as Log buckets, PubSub, cloud Storage or BigQuery.借助接收器,您可以使用多个目标,如日志存储桶、PubSub、云存储或 BigQuery。

Hope this works for your use case.希望这适用于您的用例。

暂无
暂无

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

相关问题 如何允许从前端 web 应用程序公开/未经身份验证的发布到我的 GCP 发布/订阅主题? - How do I allow public/unauthenticated publish to my GCP pub/sub topic from front-end webapp? 发送到在创建订阅之前存在的主题的 GCP Pub/Sub 消息 - GCP Pub/Sub Messages sent to topic that existed before the subscription was created 如何使用带有 jsonPayload 的 StructuredLogHandler 将日志发送到 GCP? - How to send logs to GCP using StructuredLogHandler with jsonPayload? 如何使用 Terraform 配置 GCP 发布/订阅死信 - How to configure GCP pub/sub dead letter with Terraform 为什么 GCP Pub/Sub 消息具有重复的 message_id 和 publish_time 值? - Why do GCP Pub/Sub messages have duplicated message_id and publish_time values? 当通过 GKE POD 内的 Cron 执行时,无法使用 Python SDK 将消息发布到 GCP Pub/Sub - Unable to publish messages to GCP Pub/Sub using Python SDK when executed via Cron inside a GKE POD BigQuery 可以发送发布/订阅消息吗? - Can BigQuery send a pub/sub message? 如何使用适用于 .NET 的 AWS 开发工具包将多个日志发送到单个 CloudWatch 日志流? - How can I send multiple logs to a single CloudWatch log stream using the AWS SDK for .NET? GCP Kubernetes 所有日志都显示为错误日志 - GCP Kubernetes all logs apears as error logs 谷歌云发布/订阅 - 订阅者未将消息转发到死信主题 - Google cloud Pub/Sub - subscriber not forwarding messages to dead letter topic
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM