【发布时间】:2017-04-01 16:00:21
【问题描述】:
我们有一个在 Google Cloud Platform 上运行 Ubuntu 的 Google Compute Engine 网络服务器,它将日志发送到 Stackdriver Logging API“v1beta”
我们收到了来自 Google Cloud Platform 的关于 Stackdriver Logging API v1beta3 弃用的电子邮件,提醒我们我们的“项目”仍在访问 v1 API,并建议我们切换到 v2 API。电子邮件建议升级 Stackdriver Logging Agent (fluentd),我已经这样做了。
如果我尝试从该服务器上的命令行发送日志项:
logger "Hello world!"
它仍然以 v1 API 格式出现在 Stackdriver Log 中(带有metadata.projectId、metaData.serviceName 等)
如何配置 fluentd 以使用 v2 API 而不是已弃用的 v1 API?我必须更新此服务器上应用程序中的所有日志记录集成,但我看不到在何处或如何让日志记录代理使用新 API。
【问题讨论】:
标签: logging google-compute-engine google-cloud-platform fluentd stackdriver