PromQL 从入门到精通举一个例子,比如系统负载,有最近1分钟、最近5分钟、最近15分钟的负载,需求是:最近1分 钟的负载大于8或者最近5分钟的负载大于8,就告警,promql写法: system_load1{app="clickhouse"} > 8 or 1 2 3 1 2 system_load5{app="clickhouse"} > 8 unless vector1 unless vector2,结果是一个由vec 的一些信息放到这个指标的标签里,指标值是1,相当于一个元信 息,比如: kube_pod_labels{ [...] label_name="frontdoor", label_version="1.0.1", label_team="blue" namespace="default", pod="frontdoor-xxxxxxxxx-xxxxxx", } = 1 6 7 8 假设某个 Pod 是接入层的,统计了很多 HTTP 请求相关的指标,我们想统计 5xx 的请求数量, 希望能按 Pod 的 version 画一个饼图。这里有个难点:接入层这个 Pod 没有 version 标签, version 信息只是出现在 kube_pod_labels 中,如何让二者联动呢?上答案: sum( rate(http_request_count{code=~"^(0 码力 | 16 页 | 2.77 MB | 1 年前3
1.6 利用夜莺扩展能力打造全方位监控系统夜莺Server数据处理 03. AlarmRule Control 夜莺Server数据处理 04. CollectRule Control 夜莺Server数据处理 04. CollectRule Control 夜莺Server数据处理 04. CollectRule Control 夜莺Server数据处理 04. CollectRule Control 夜莺Server数据处理 04. CollectRule Control 夜莺Server数据处理 05. data - write 夜莺Server数据处理 06. data - read 夜莺Server数据处理 夜莺设计实现 技术难点及细节 第六部分 01. 规则集中化管理及自动发现 夜莺 技术难点及细节 02. 采集器 夜莺 技术难点及细节 02. 数据序列化及传输问题 夜莺 技术难点及细节 Thank0 码力 | 40 页 | 3.85 MB | 1 年前3
Intro to Prometheus - With a dash of operations & observabilityBackground Operations & observability Outro Working assumptions & concepts Prometheus is a pull-based system Black-box monitoring: Looking at a service from the outside (Does the server answer to HTTP requests Intro to Prometheus Introduction Background Operations & observability Outro Leverage One combined system allows for correlation and combination Power usage against service load Optical networks against0 码力 | 19 页 | 63.73 KB | 1 年前3
OpenMetrics - Standing on the shoulders of Titansintends to breathe out by creating one consistent user story encompassing all events in the next version OpenStats - OpenMetrics for push Events - Logs, Traces, Coredumps, whatever Richard Hartmann, RichiH@{freenode0 码力 | 21 页 | 84.83 KB | 1 年前3
Prometheus Deep Dive - Monitoring. At scale.latest is the cloud-native approach, but this is still not acceptable ..especially if every single version has its issues We put in more checks and balances to ensure cleaner releases going forward If there0 码力 | 34 页 | 370.20 KB | 1 年前3
共 5 条
- 1













