Helo everyone
what is the difference between http_2xx and dns module configuration
I have this example y my config
blackbox.yml
modules:
http_2xx:
prober: http
http:
preferred_ip_protocol: "ip4"
http_post_2xx:
prober: http
http:
method: POST
www.google.com:
prober: dns
timeout: 1s
dns:
transport_protocol: "udp"
preferred_ip_protocol: "ip4"
query_name: "www.google.com"
query_type: "A"
valid_rcodes:
- NOERROR
prometheus.yml
- job_name: 'blackbox'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- https://www.google.com
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: localhost:9115
- job_name: 'blackbox-dns-monitor'
scrape_interval: 1s
metrics_path: /probe
#params:
#module: [mindfree.cl]
relabel_configs:
# Populate domain label with domain portion of __address__
- source_labels: [__address__]
regex: (.*):.*$
replacement: $1
target_label: domain
# Populate instance label with dns server IP portion of __address__
- source_labels: [__address__]
regex: .*:(.*)$
replacement: $1
target_label: instance
# Populate module URL parameter with domain portion of __address__
# This is a parameter passed to the blackbox exporter
- source_labels: [domain]
target_label: __param_module
# Populate target URL parameter with dns server IP
- source_labels: [instance]
target_label: __param_target
# Populate __address__ with the address of the blackbox exporter to hit
- target_label: __address__
replacement: localhost:9115
static_configs:
- targets:
- www.google.com:1.1.1.1 #australia cloudflare
- www.google.com:8.8.8.8 #example other nameserver
So, i will try config a simple DNS resolution for any domain
If i want add other nameserver i need to add other line with the same domain
Why whe i used module http_2xx need simple add the target
Thanks
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/06f1ca3f-97ea-4cc7-8ac4-e6c26d210043n%40googlegroups.com.