I have a case wherein I have to poll a target and its normal for the site to send me "401" code.
However, when I add the entries in prometheus.yml and a new module in blackbox_exporter.yml, prometheus does not like the 401 error and does not seem to use the blackbox_exporter at all. (I've started the blackbox on debug, on command line and its not printing anything)
- job_name: 'IDAHO_SERVICE_SVN_AND'
metrics_path: /svn/idaho-config/PROD
scrape_interval: 10s
params:
module: [http_401_unauth]
static_configs:
- targets: ['10.131.104.193']
labels:
group: 'IDAHO_SERVICE'
service: 'IDAHO_SERVICE_SVN_AND'
/etc/blackbox_exporter/blackbox_exporter.yml:
...
modules:
http_401_unauth:
prober: http
http:
valid_status_codes: [401,200,409]
The error that I'm getting is :server returned HTTP status 401 Unauthorized
It looks like Prometheus is reporting the 401 error even before asking blackbox_exporter to probe it?
Can anyone please help me understand the error ?
Thanks in advance.