- 监控服务
[root@10 prometheus]# vim prometheus.yml - job_name: 'xixi_http2xx_probe' metrics_path: /probe params: module: [http_2xx] ### # Look for a HTTP 200 response. static_configs: - targets: - http://www.xixi.com relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 10.11.0.217:9115
报警规则
[root@10 prometheus]# vim first_rules.yml - name: xiaoxin官网 rules: - alert: xiaoxin_http2xx_probe expr: probe_success{job="xixi_http2xx_probe"} == 0 for: 30s labels: name: "{{ $labels.job }}" severity: Critical annotations: summary: "Probe failed (instance {{ $labels.instance }})" description: "Probe failed\n LABELS: {{ $labels }}" value: "{{ $value }}"
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论