美文网首页
istio-日志-Envoy’s access logging

istio-日志-Envoy’s access logging

作者: 与诗小睡 | 来源:发表于2020-06-30 15:55 被阅读0次
  1. 本任务展示如何配置 Istio 来自动地收集网格中服务的遥测指标。任务的最后,将为调用网格内部的服务打开一个新的日志流。

1.1 开启 Envoy’s access logging

[root@master bin]# ./istioctl install --set profile=demo --set meshConfig.accessLogFile="/dev/stdout"cd 
Detected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for details.
✔ Istio core installed                                                                                                                                                      
✔ Istiod installed                                                                                                                                                          
✔ Egress gateways installed                                                                                                                                                 
✔ Ingress gateways installed                                                                                                                                                
✔ Addons installed                                                                                                                                                          
✔ Installation complete                                                                                                                                                     [root@master bin]#
  1. 向示例应用发送流量


    image.png
  2. 验证是否已经生成了日志流并且正向其中不断增添请求。
  • 在 Kubernetes 环境, 如下所示:
[root@master istio-1.6.3]# kubectl logs -l app=productpage  -c istio-proxy
[2020-07-01T07:53:02.987Z] "GET /reviews/0 HTTP/1.1" 200 - "-" "-" 0 379 2732 2732 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "ae731a48-3839-95e1-a132-35522711f75a" "reviews:9080" "100.122.25.9:9080" outbound|9080||reviews.default.svc.cluster.local 100.122.25.49:34964 10.104.229.61:9080 100.122.25.49:34534 - default
[2020-07-01T07:53:01.379Z] "GET /productpage HTTP/1.1" 200 - "-" "-" 0 5183 4345 4344 "100.89.161.128" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "ae731a48-3839-95e1-a132-35522711f75a" "192.168.14.130:32082" "127.0.0.1:9080" inbound|9080|http|productpage.default.svc.cluster.local 127.0.0.1:40528 100.122.25.49:9080 100.89.161.128:0 outbound_.9080_._.productpage.default.svc.cluster.local default
[2020-07-01T07:53:06.776Z] "GET /static/bootstrap/fonts/glyphicons-halflings-regular.woff2 HTTP/1.1" 200 - "-" "-" 0 18028 238 228 "100.89.161.128" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "63fa06f7-faad-9ecf-9f61-d786cd954b99" "192.168.14.130:32082" "127.0.0.1:9080" inbound|9080|http|productpage.default.svc.cluster.local 127.0.0.1:40622 100.122.25.49:9080 100.89.161.128:0 outbound_.9080_._.productpage.default.svc.cluster.local default
[2020-07-01T07:55:44.199Z] "GET /details/0 HTTP/1.1" 200 - "-" "-" 0 178 52 52 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "25535e07-725c-966a-afbe-57df1438bba5" "details:9080" "100.122.25.44:9080" outbound|9080||details.default.svc.cluster.local 100.122.25.49:42296 10.106.183.190:9080 100.122.25.49:44362 - default
[2020-07-01T07:55:44.270Z] "GET /reviews/0 HTTP/1.1" 200 - "-" "-" 0 295 257 257 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "25535e07-725c-966a-afbe-57df1438bba5" "reviews:9080" "100.122.25.2:9080" outbound|9080||reviews.default.svc.cluster.local 100.122.25.49:60882 10.104.229.61:9080 100.122.25.49:36846 - default
[2020-07-01T07:55:43.521Z] "GET /productpage HTTP/1.1" 200 - "-" "-" 0 4183 1028 1027 "100.89.161.128" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "25535e07-725c-966a-afbe-57df1438bba5" "192.168.14.130:32082" "127.0.0.1:9080" inbound|9080|http|productpage.default.svc.cluster.local 127.0.0.1:42850 100.122.25.49:9080 100.89.161.128:0 outbound_.9080_._.productpage.default.svc.cluster.local default
[2020-07-01T07:55:49.719Z] "GET /details/0 HTTP/1.1" 200 - "-" "-" 0 178 1 1 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "7190150e-70f9-9815-9ac6-c622be198be6" "details:9080" "100.122.25.44:9080" outbound|9080||details.default.svc.cluster.local 100.122.25.49:42296 10.106.183.190:9080 100.122.25.49:44446 - default
[2020-07-01T07:55:49.725Z] "GET /reviews/0 HTTP/1.1" 200 - "-" "-" 0 295 7 7 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "7190150e-70f9-9815-9ac6-c622be198be6" "reviews:9080" "100.122.25.2:9080" outbound|9080||reviews.default.svc.cluster.local 100.122.25.49:60808 10.104.229.61:9080 100.122.25.49:36926 - default
[2020-07-01T07:55:49.715Z] "GET /productpage HTTP/1.1" 200 - "-" "-" 0 4183 19 19 "100.89.161.128" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "7190150e-70f9-9815-9ac6-c622be198be6" "192.168.14.130:32082" "127.0.0.1:9080" inbound|9080|http|productpage.default.svc.cluster.local 127.0.0.1:42946 100.122.25.49:9080 100.89.161.128:0 outbound_.9080_._.productpage.default.svc.cluster.local default
[2020-07-01T07:55:50.502Z] "GET /details/0 HTTP/1.1" 200 - "-" "-" 0 178 2 1 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "c42653e7-61ba-99ec-9189-f3c5b471548e" "details:9080" "100.122.25.44:9080" outbound|9080||details.default.svc.cluster.local 100.122.25.49:41988 10.106.183.190:9080 100.122.25.49:44466 - default
[root@master istio-1.6.3]#
  1. 清理:
istioctl install --set profile=demo

相关文章

  • istio-日志-Envoy’s access logging

    本任务展示如何配置 Istio 来自动地收集网格中服务的遥测指标。任务的最后,将为调用网格内部的服务打开一个新的日...

  • 日志模块logging

    内置,直接导入 import logging 设置日志文件路径 format = '[%(asctime)s %(...

  • 2019-05-28

    Python中的日志模块 logging使用 参数:作用%(levelno)s:打印日志级别的数值%(leveln...

  • 开始Spring cloud gatway日志

    版本:2.1.5logging: level:#配置Spring Cloud Gateway的日志配置 org.s...

  • logging

    Menu logging定义 logging - basicConfig logging定义 日志模块 loggi...

  • tomcat access log日志分析

    tomcat默认access log日志格式为 pattern="%h %l %u %t "%r" %s %b" ...

  • Python39_日志处理

    logging模块 日志基础 日志级别(从低到高): logging.NOTSET:不设置 loging.debu...

  • 日志框架

    日志门面 Apache Commons Logging (之前叫 Jakarta Commons Logging,...

  • appium自动化测试日志收集-logging

    关于日志级别: logging对象和filehandler都可以设置日志级别,logging设置的日志级别是控制台...

  • logging模块

    (一)什么是logging模块? logging是Python内置的日志模块,用于生成程序的日志 (二...

网友评论

      本文标题:istio-日志-Envoy’s access logging

      本文链接:https://www.haomeiwen.com/subject/hnzcqktx.html