zoukankan      html  css  js  c++  java
  • prometheus 配置项注意事项

    1.job:metrics_path

    如果是静态模式下配置job(statics),直接配置job的metrics_path选项是不生效的。需要同时在exporter端指定metrics_path。如图

    prometheus server端配置:

    exporter端启动命令(假设是node-exporter):

    /node_exporter --web.telemetry-path=/danny

    这里的“--web.telemetry-path=/danny”就是指定path是"/danny",而非默认的“/metrics”;

    2.global:external_labels

    配置项external_labels是用于外部系统标签的,不是用于metrics数据。当使用thanos作为prometheus集群时,external_labels是必填项。

    3.job:honor_labels

    honor_labels主要用于解决prometheus server的label与exporter端用户自定义label冲突的问题。

    官方说明:

    #If honor_labels is set to "true", label conflicts are resolved by keeping label
    # values from the scraped data and ignoring the conflicting server-side labels.
    #
    # If honor_labels is set to "false", label conflicts are resolved by renaming
    # conflicting labels in the scraped data to "exported_<original-label>" (for
    # example "exported_instance", "exported_job") and then attaching server-side
    # labels. This is useful for use cases such as federation, where all labels
    # specified in the target should be preserved.
  • 相关阅读:
    ajax遍历数组(实现百度搜索提示的效果)
    角色管理的增删改
    String与Date、Timestamp互转
    jquery
    认识拦截器
    验证表单介绍
    什么是struts2?
    如何理解OOP?
    请描述Java中的时间监听机制?
    hibernate3中session.get()与session.load()两个方法的区别?
  • 原文地址:https://www.cnblogs.com/danny-djy/p/11088717.html
Copyright © 2011-2022 走看看