Hi,
I have an end point which sits behind Basic Auth. I have to probe the endpoint.
I am unable to do so as it is throwing 401 error. Please find my prometheus and
blackbox_exporter config.Any help is greatly appreciated.
PROM config:
global:
external_labels:
monitor: 'blackbox'
scrape_configs:
- job_name: 'blackbox' # To get metrics about the exporter itself
scrape_interval: 15s
metrics_path: /metrics
static_configs:
- targets:
- host.docker.internal:9115
- job_name: 'blackbox-http-feedback'
scrape_interval: 10s
scrape_timeout: 10s
metrics_path: /probe
params:
module: [http_2basicauth_test] # Look for a HTTP 200 response.
static_configs:
- targets:
- https://example.com/insights/health # Target to probe with http on
port 8080.
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
replacement: ${1}
- source_labels: [__param_target]
target_label: instance
replacement: ${1}
- source_labels: []
regex: .*
target_label: __address__
replacement: host.docker.internal:9115 # The blackbox exporter's real
hostname:port.
blackbox config:
modules:
http_2basicauth_test:
prober: http
timeout: 15s
http:
preferred_ip_protocol: "ip4"
method: GET
valid_status_codes: [200, 302]
tls_config:
insecure_skip_verify: true
# headers:
# Host: "feedback.test01.pageplace.de/insights/health"
basic_auth:
username: username
password: password
Thanks
Eswar
--
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/cbdb9603-c50c-4f42-a010-9bd3fd97b972%40googlegroups.com.