记录自https://cloud.google.com/monitoring/api/v3/metrics#time-series
指标数据的收集时间表因受监控的资源而异。有些数据由 Stackdriver Monitoring 定期从受监控的资源中“拉取”,有些数据由应用程序、服务或 Stackdriver Monitoring 代理“推送”。
我想知道 stackdriver 如何从 Google Cloud Pub/Sub 收集数据,承诺的延迟范围是多少?我尝试创建主题/订阅并发布消息,并观察指标记录到 stackdriver 需要多长时间。平均大约1-2分钟,但有时很慢,长达5-8分钟。
StackDriver支持Syslog协议吗?如果是这样,有人可以分享一个例子吗?
对于上下文,我希望使用 Syslog 协议将日志记录条目写入 StackDriver。我已经查看了文档,但没有办法这样做。因此,到目前为止,关闭方法似乎正在使用 StackDriver 代理。但是,我想利用 Apigee 等 API 网关,它通过Message Logging Policy支持 Syslog 协议。
我知道可以利用 REST API 来发送这些条目。但是,我试图避免创建额外的 HTTP 层。
任何帮助表示赞赏。提前致谢!
Stackdriver Logging 是否能够通过 syslog 协议接收日志?
我正在使用开源 Heroku Logplex 路由器来收集日志。Logplex 允许您设置一个排出器来发送聚合日志,但我认为它使用 syslog 格式发送它。
我想使用 Stackdriver Logging,但我无法弄清楚要发送到哪个 syslog URL。
我正在尝试为我的服务提供的自定义指标设置 Stackdriver 仪表板。
特别是我从一般custom/grpc/time_ms度量开始,它是一个仪表并且上面有status标签。我希望能够设置图表并提醒指标的成功率(类似count:custom/grpc/time_ms{status:OK} / count:custom/grpc/time_ms{*})。
在我之前的项目中,我使用了 Datadog,在那里这样做非常容易。但是我在 UI 和 Stackdriver 文档中都没有看到任何类似的功能。所以我想知道它是否没有记录或根本不支持?
我在 GAE 上部署了一个 Web 应用程序。我正在使用 SLF4j 的 log4j2 实现进行日志记录。
我可以在 stackdriver 控制台上看到我的所有日志。但是我所有日志的级别都显示为 stackdriver 下的信息。它没有根据日志级别(如调试、信息、警告和错误)正确分类。
例如,我的log.error("error")也显示在 stackdriver 控制台的信息级别下。
但是当我使用 SLF4 (slf4j-jdk14) 的 JUL 实现时。所有日志都在 stackdriver 中以适当的日志级别正确报告。
任何人都可以建议可能是什么问题吗?
这里是 POM。
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
<exclusions>
<exclusion>
<artifactId>tomcat-embed-logging-juli</artifactId>
<groupId>org.apache.tomcat.embed</groupId>
</exclusion>
<exclusion>
<artifactId>tomcat-embed-websocket</artifactId>
<groupId>org.apache.tomcat.embed</groupId> …Run Code Online (Sandbox Code Playgroud) google-cloud-platform google-cloud-trace google-cloud-logging stackdriver google-cloud-stackdriver
我需要通过 Dataflow 和 Beam 运行从 GCS 到 BigQuery 的批处理作业。我的所有文件都是具有相同架构的 avro。我创建了一个数据流 java 应用程序,它在较小的数据集(~1gb,大约 5 个文件)上成功。但是当我尝试在更大的数据集(>500gb,>1000 个文件)上运行它时,我收到一条错误消息
java.lang.RuntimeException: org.apache.beam.sdk.util.UserCodeException: java.lang.RuntimeException: Failed to create load job with id prefix 1b83679a4f5d48c5b45ff20b2b822728_6e48345728d4da6cb51353f0dc550c1b_00001_00000, reached max retries: 3, last failed load job: ...
Run Code Online (Sandbox Code Playgroud)
3 次重试后,它终止于:
Workflow failed. Causes: S57....... A work item was attempted 4 times without success....
Run Code Online (Sandbox Code Playgroud)
这一步是对 BigQuery 的加载。
堆栈驱动程序说处理卡在步骤....10m00s...和
Request failed with code 409, performed 0 retries due to IOExceptions, performed 0 retries due to unsuccessful status codes.....
Run Code Online (Sandbox Code Playgroud)
我查找了 409 错误代码,指出我可能有一个现有的作业、数据集或表。我已经删除了所有表并重新运行了应用程序,但它仍然显示相同的错误消息。
我目前仅限于 65 个工人,我让他们使用 …
我在 GCP 中有多个项目,我试图在一个地方读取我所有项目的日志。
有什么建议?
我已经向Kubernetes 集群添加了几个Horizontal Pod Autoscalers (HPA)。我想随着时间的推移监控每个 pod 的副本数量。
不为Stackdriver有一个选项,以监控每荚随着时间的副本的数量?创建指标时,我找不到允许我执行此操作的选项。
我在 GKE 上有一个集群。
已启用 Stackdriver Kubernetes Engine 监控
在我的错误列表 ( https://console.cloud.google.com/errors/ ) 中,我看到堆栈跟踪错误Seen in gke_instances。
但我不知道如何确定它与哪个特定容器相关。不知道为什么它不“开箱即用”。
我不知道如何使它正确,有什么建议吗?
GCP 的 Stackdriver 中有一些指标,如 fe serviceruntime.googleapis.com/quota/exceeded,出现问题时会出现,如果没有更多问题,则不存在(不是 0)。
问题是我无法设置警报以自动解决,因为当问题解决时,此指标的数据不存在。
如何设置警报以使用这些类型的指标自动解决?
monitoring google-cloud-platform stackdriver google-cloud-monitoring google-cloud-stackdriver
stackdriver ×10
monitoring ×2
apigee ×1
dataflow ×1
heroku ×1
kubernetes ×1
latency ×1
logging ×1
syslog ×1