kamisama
V2EX  ›  问与答

Prometheus 的相对指标怎么比较

  •  
  •   kamisama · Dec 24, 2020 · 1319 views
    This topic created in 1989 days ago, the information mentioned may be changed or developed.

    我线上服务有多个实例,有些实例的机器因为网络问题耗时比较高,目标是找出超过 所有机器平均耗时 的单个实例,怎么配置规则呢?

    下面这个规则是不行的

    (sum(irate(service_hist_sum{audience="total"}[2m]))  by (instance) ) / (sum(irate(service_hits_count{audience="total"}[2m])) by (instance)) > 
    sum(sum(irate(service_hits_sum{audience="total"}[2m])) / sum(irate(service_hits_count{audience="total"}[2m])))
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3004 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 04:12 · PVG 12:12 · LAX 21:12 · JFK 00:12
    ♥ Do have faith in what you're doing.