Giter Club home page Giter Club logo

Comments (1)

UlricQin avatar UlricQin commented on June 18, 2024

不支持这种做法。在 Prometheus 生态里,基本都是靠监控数据的指标来筛选,比如你的用于 Dev 的 Monitor 机器,可以打上标签:env=dev,service=monitor,之后可以有两种办法配置告警规则:

方法1:拆成不同的告警规则,每个告警规则里写详细的筛选条件,适合于不同的机器不同的阈值的场景

# 告警规则1,告警接收人可能是 dev 团队
mem_used_percent{env="dev", service="monitor"} > 80

# 告警规则2,告警接收人可能是 prod 团队
mem_used_percent{env="prod", service="monitor"} > 85

方法2:只配置一条告警规则,不同的告警事件由不同的人订阅接收。需要去了解一下订阅规则。适用于不同的机器阈值相同的场景。

# 只需要一条告警规则,不需要配置告警接收人。在订阅规则那里配置不同的标签不同的接收人
# 订阅规则里,比如 `env="prod"` 的就发给 prod,`env="dev"` 的就发给 dev
mem_used_percent > 80

核心原因1:业务组的树形结构其实是假的,本质是扁平的,只是视觉效果上可以展示成树的样子。
核心原因2:promql 告警判定查的是时序库,和业务组其实没关系,没法在告警的时候联动业务组

后面会改么?

短期不会。长期的话可能会同时引入类似 zabbix 的告警模板的概念。需要从长计议。

from nightingale.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.