阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

istio指标收集与查询

292次阅读
没有评论

共计 926 个字符,预计需要花费 3 分钟才能阅读完成。

一、istio 指标收集与查询

1、通过 Prometheus 查询度量指标

采集新的指标 应用配置新指标的 YAML 文件,该指标将由 Istio 自动生成和采集 kubectl apply -f metrics.yaml 修改 prometheus 的 svc 模式由 ClusterIP 为 NodePort kubectl edit svc prometheus -n istio-system 查看 prometheus 的端口 kubectl get svc -n istio-system 通过浏览器进行访问 http://IP:PORT 上述链接打开 Prometheus 并执行对 istio_double_request_count 指标值的查询语句 因为没有数据,我们通过下列命令模拟产生数据,随便打开一个终端,执行以下命令 watch -n 1 curl -o /dev/null -s -w %{http_code} http://182.61.167.80:31380/productpage 其他查询:请求 productpage 服务的总次数:istio_requests_total{destination_service="productpage.default.svc.cluster.local"} 请求 reviews 服务 V3 版本的总次数:istio_requests_total{destination_service="reviews.default.svc.cluster.local", destination_version="v3"} 该查询返回所有请求 reviews 服务 v3 版本的当前总次数。过去 5 分钟 productpage 服务所有实例的请求频次:rate(istio_requests_total{destination_service=~"productpage.*", response_code="200"}[5m])

istio 指标收集与查询

istio 指标收集与查询

istio 指标收集与查询

istio 指标收集与查询

2、使用 Grafana 可视化指标

修改 grafana 的 svc 模式由 ClusterIP 为 NodePort kubectl edit svc grafana -n istio-system 查看 grafana 的端口 kubectl get svc -n istio-system 通过浏览器进行访问 http://IP:PORT

istio 指标收集与查询

istio 指标收集与查询

istio 指标收集与查询

istio 指标收集与查询

istio 指标收集与查询

istio 指标收集与查询

正文完
星哥说事-微信公众号
post-qrcode
 
星锅
版权声明:本站原创文章,由 星锅 2022-06-09发表,共计926字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中