zoukankan      html  css  js  c++  java
  • Traefik开启监控,日志,追踪需要的参数

    监控

    官方文档地址:https://doc.traefik.io/traefik/observability/metrics/overview/

    可以使用多种监控软件,比如Datadog,InfluxDB,Prometheus,StatsD
    在这里使用Prometheus

    --api.debug=true
    --metrics.prometheus=true
    --metrics.prometheus.addEntryPointsLabels=true
    --metrics.prometheus.addrouterslabels=true
    --metrics.prometheus.addServicesLabels=true
    --entryPoints.metrics.address=:8082
    --metrics.prometheus.entryPoint=metrics
    --metrics.prometheus.manualrouting=true
    

    日志

    官方文档地址:https://doc.traefik.io/traefik/observability/access-logs/

    --accesslog=true
    --accesslog.format=json # text
    --log.filePath=/path/to/traefik.log #可以创建数据卷把这个路径给挂载出去
    --log.level=DEBUG # DEBUG, PANIC, FATAL, ERROR, WARN, INFO
    --accesslog.fields.defaultmode=keep
    --accesslog.fields.names.ClientUsername=drop
    --accesslog.fields.headers.defaultmode=keep
    --accesslog.fields.headers.names.User-Agent=redact
    --accesslog.fields.headers.names.Authorization=drop
    --accesslog.fields.headers.names.Content-Type=keep
    

    追踪

    官方文档地址:https://doc.traefik.io/traefik/observability/tracing/elastic/

    Traefik支持六个跟踪后端:Jaeger,Zipkin,Datadog,Instana,Haystack,Elastic

    在这里是作为Elastic APM Agent来进行处理的,所以配置的是Elastic APM server相关参数

    --tracing=true
    --tracing.serviceName=traefik
    --tracing.spanNameLimit=150
    --tracing.elastic=true
    --tracing.elastic.serverurl="http://apm:8200"
    --tracing.elastic.secrettoken="mytoken"
    --tracing.elastic.serviceenvironment="production"
    

  • 相关阅读:
    基本数据结构:链表(list)
    字符串函数
    TCHAR
    开源库链接
    视频 链接
    tabbar
    加密
    安全类链接,https
    资本
    审核 -链接 - 发布证书
  • 原文地址:https://www.cnblogs.com/sanduzxcvbnm/p/15752568.html
Copyright © 2011-2022 走看看