gpt4 book ai didi

kubernetes - 使用istio设置服务指标的指南

转载 作者:行者123 更新时间:2023-12-02 12:31:27 25 4
gpt4 key购买 nike

我想知道是否有人可以指出我是使用istio报告基本指标的服务的良好来源。我会假设诸如响应成功(200),错误(503,404等),事务时间之类的简单事情会自动连接起来,但是我想我缺少了一些东西。

我过去使用过诸如collect和statsd之类的东西来汇总指标,但是期望一些基本的东西能够自动连接起来。

我计划尽快使用bookinfo应用程序,看看是否可能回答我的问题L https://istio.io/docs/examples/bookinfo/

最佳答案

如果您打算设置Bookinfo示例应用程序,那么我建议您坚持使用istio文档。

如果您进入ISTIO / DOCS / TASKS / TELEMETRY / METRICS / COLLECTING METRICS,它将说明如何使用Mixer功能通过Prometheus UI设置基本指标收集。

The metrics configuration directs Mixer to send metric values to Prometheus. It uses three stanzas (or blocks) of configuration: instance configuration, handler configuration, and rule configuration.

The kind: instance stanza of configuration defines a schema for generated metric values (or instances) for a new metric named doublerequestcount. This instance configuration tells Mixer how to generate metric values for any given request, based on the attributes reported by Envoy (and generated by Mixer itself).

The kind: handler stanza of configuration defines a handler named doublehandler. The handler spec configures how the Prometheus adapter code translates received metric instances into Prometheus-formatted values that can be processed by a Prometheus backend. This configuration specified a new Prometheus metric named double_request_count. The Prometheus adapter prepends the istio_ namespace to all metric names, therefore this metric will show up in Prometheus as istio_double_request_count. The metric has three labels matching the dimensions configured for doublerequestcount instances.

The kind: rule stanza of configuration defines a new rule named doubleprom. The rule directs Mixer to send all doublerequestcount instances to the doublehandler handler. Because there is no match clause in the rule, and because the rule is in the configured default configuration namespace (istio-system), the rule is executed for all requests in the mesh.



您也可以使用Prometheus附加组件阅读和设置 Querying Metrics from Prometheus:

Mixer comes with a built-in Prometheus adapter that exposes an endpoint serving generated metric values. The Prometheus add-on is a Prometheus server that comes preconfigured to scrape Mixer endpoints to collect the exposed metrics. It provides a mechanism for persistent storage and querying of Istio metrics.

关于kubernetes - 使用istio设置服务指标的指南,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58460023/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com