-
-
Save bdmorin/2cf465c50516a31593ff634bcdced6da to your computer and use it in GitHub Desktop.
smokeping style metrics in prometheus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
evaluation_interval: 15s | |
rule_files: | |
- smokeping.rules | |
scrape_configs: | |
- job_name: 'blackbox_icmp' | |
metrics_path: /probe | |
params: | |
module: [icmp] | |
scrape_interval: 1s | |
static_configs: | |
- targets: | |
- ... | |
relabel_configs: | |
- source_labels: [__address__] | |
target_label: __param_target | |
- source_labels: [__param_target] | |
target_label: instance | |
- target_label: __address__ | |
replacement: 127.0.0.1:9115 # Blackbox exporter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
groups: | |
- name: smokeping.rules | |
rules: | |
- record: job:probe_loss:avg15s | |
expr: 1 - avg_over_time(probe_success{job="blackbox_icmp"}[15s]) | |
- record: job:probe_durration_seconds:min15s | |
expr: min_over_time(probe_duration_seconds{job="blackbox_icmp"}[15s]) | |
- record: job:probe_durration_seconds:q25_15s | |
expr: quantile_over_time(0.25, probe_duration_seconds{job="blackbox_icmp"}[15s]) | |
- record: job:probe_durration_seconds:q50_15s | |
expr: quantile_over_time(0.5, probe_duration_seconds{job="blackbox_icmp"}[15s]) | |
- record: job:probe_durration_seconds:q75_15s | |
expr: quantile_over_time(0.75, probe_duration_seconds{job="blackbox_icmp"}[15s]) | |
- record: job:probe_durration_seconds:max15s | |
expr: max_over_time(probe_duration_seconds{job="blackbox_icmp"}[15s]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment