Skip to content

Instantly share code, notes, and snippets.

@mmb
Created December 5, 2021 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmb/cd6090282e612303c948c7f07495449c to your computer and use it in GitHub Desktop.
Save mmb/cd6090282e612303c948c7f07495449c to your computer and use it in GitHub Desktop.
Pi-hole blackbox probe to test DNS blocking
modules:
pi-hole-test:
prober: dns
timeout: 5s
dns:
query_name: pagead2.googlesyndication.com
query_type: A
validate_answer_rrs:
fail_if_not_matches_regexp:
- ".*0.0.0.0"
scrape_configs:
- job_name: pi-hole-test
metrics_path: /probe
params:
module: [pi-hole-test]
static_configs:
- targets:
- 192.168.0.2
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment