我想在失败时触发警报时获取 HTTP 响应代码,因为目前我收到了很多。
alert.rules.yml
groups:
- name: alert.rules
rules:
- alert: service_down
expr: probe_success == 0
for: 1m
labels:
severity: 3
threshold: danger
annotations:
summary: "Instance *{{ $labels.instance }}* down."
description: "*{{ $labels.instance }}* of job *{{ $labels.job }}* is down"
有没有办法获取响应代码?