Skip to content
Snippets Groups Projects
Commit 676c7028 authored by ale's avatar ale
Browse files

Add "probeset" dimension to probe metrics

parent af1a73e8
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ groups: ...@@ -55,7 +55,7 @@ groups:
redundancy ({{ $value }}) and may eventually be at risk.' redundancy ({{ $value }}) and may eventually be at risk.'
- alert: JobDown - alert: JobDown
expr: job:up:ratio < 0.51 expr: job:up:ratio < 0.5
for: 5m for: 5m
labels: labels:
severity: page severity: page
...@@ -65,7 +65,7 @@ groups: ...@@ -65,7 +65,7 @@ groups:
description: 'Job {{ $labels.job }} is down globally (availability {{ $value }}).' description: 'Job {{ $labels.job }} is down globally (availability {{ $value }}).'
- alert: ProbeFailure - alert: ProbeFailure
expr: target:probe_success:ratio{probe!="ping"} < 0.5 expr: target:probe_success:ratio{probe!="ping",probeset!="service"} < 0.5
for: 5m for: 5m
labels: labels:
severity: page severity: page
...@@ -76,7 +76,7 @@ groups: ...@@ -76,7 +76,7 @@ groups:
for target {{ $labels.target }} (success ratio {{ $value }}).' for target {{ $labels.target }} (success ratio {{ $value }}).'
- alert: ProbeFailure - alert: ProbeFailure
expr: probe:probe_success:ratio{probe!="ping"} < 0.5 expr: probe:probe_success:ratio{probe!="ping",probeset!="service"} < 0.5
for: 5m for: 5m
labels: labels:
severity: page severity: page
......
...@@ -11,17 +11,17 @@ groups: ...@@ -11,17 +11,17 @@ groups:
# Sum prober metrics over the probers (hosts), producing # Sum prober metrics over the probers (hosts), producing
# an aggregation by target. # an aggregation by target.
- record: target:probe_success:count - record: target:probe_success:count
expr: count(probe_success) by (probe,zone,target) expr: count(probe_success) by (probe,probeset,zone,target)
- record: target:probe_success:sum - record: target:probe_success:sum
expr: sum(probe_success) by (probe,zone,target) expr: sum(probe_success) by (probe,probeset,zone,target)
- record: target:probe_success:ratio - record: target:probe_success:ratio
expr: target:probe_success:sum / target:probe_success:count expr: target:probe_success:sum / target:probe_success:count
# Sum prober metrics over targets, aggregating by probe. # Sum prober metrics over targets, aggregating by probe.
- record: probe:probe_success:count - record: probe:probe_success:count
expr: count(probe_success) by (probe,zone) expr: count(probe_success) by (probe,probeset,zone)
- record: probe:probe_success:sum - record: probe:probe_success:sum
expr: sum(probe_success) by (probe,zone) expr: sum(probe_success) by (probe,probeset,zone)
- record: probe:probe_success:ratio - record: probe:probe_success:ratio
expr: probe:probe_success:sum / probe:probe_success:count expr: probe:probe_success:sum / probe:probe_success:count
......
...@@ -124,6 +124,7 @@ scrape_configs: ...@@ -124,6 +124,7 @@ scrape_configs:
labels: labels:
zone: internal zone: internal
probe: ping probe: ping
probeset: base
- job_name: "prober_https_{{ prober_idx }}" - job_name: "prober_https_{{ prober_idx }}"
metrics_path: "/probe" metrics_path: "/probe"
...@@ -151,6 +152,7 @@ scrape_configs: ...@@ -151,6 +152,7 @@ scrape_configs:
labels: labels:
zone: public zone: public
probe: https_up probe: https_up
probeset: base
{% for custom_probe in prometheus_custom_blackbox_probes.get('http', []) %} {% for custom_probe in prometheus_custom_blackbox_probes.get('http', []) %}
- job_name: "prober_https_{{ custom_probe.name }}_{{ prober_idx }}" - job_name: "prober_https_{{ custom_probe.name }}_{{ prober_idx }}"
...@@ -179,6 +181,7 @@ scrape_configs: ...@@ -179,6 +181,7 @@ scrape_configs:
labels: labels:
zone: public zone: public
probe: https probe: https
probeset: base
{% endfor %} {% endfor %}
- job_name: "prober_dns_{{ prober_idx }}" - job_name: "prober_dns_{{ prober_idx }}"
...@@ -206,6 +209,7 @@ scrape_configs: ...@@ -206,6 +209,7 @@ scrape_configs:
labels: labels:
zone: public zone: public
probe: dns probe: dns
probeset: base
{% endfor %} {% endfor %}
...@@ -216,6 +220,8 @@ scrape_configs: ...@@ -216,6 +220,8 @@ scrape_configs:
metrics_path: "{{ target.metrics_path | default('/metrics') }}" metrics_path: "{{ target.metrics_path | default('/metrics') }}"
static_configs: static_configs:
- targets: {{ target.targets | to_json }} - targets: {{ target.targets | to_json }}
labels:
zone: external
relabel_configs: relabel_configs:
- source_labels: [__address__] - source_labels: [__address__]
target_label: host target_label: host
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment