Article 6E95R Prometheus - Blackbox exporter to monitor local HTTP server

Prometheus - Blackbox exporter to monitor local HTTP server

by
czezz
from LinuxQuestions.org on (#6E95R)
Im trying to play around Prometheus and Blackbox exporter.
Both are installed.

Now to do a simple test, I want to monitor with it my local HTTP server.
Question: do I need to add anything to that HTTP server in order to see any metrics/scraps in Prometheus?

This is my blackbox entry in prometheus.yml:

Code:- job_name: blackbox
honor_timestamps: true
params:
module:
- http_2xx
scrape_interval: 30s
scrape_timeout: 10s
metrics_path: /
#metrics_path: /probe
#metrics_path: /bbx/probe
scheme: http
static_configs:
- targets:
- http://192.168.1.194/
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 192.168.1.175:9115
#replacement: localhost:9115 # Blackbox exporter.It seems not to work and either I have some misconfiguration OR Prometheus/Blackbox expects some agent/client on the endpoint site - but this is not clear to me (see screen shot)
https://www.linuxquestions.org/quest...1&d=1693321754

On the other hand blackbox exporter logs shows it is successful:
https://www.linuxquestions.org/quest...1&d=1693322055
Attached Thumbnailsattachment.php?attachmentid=41541&stc=1&attachment.php?attachmentid=41542&stc=1&
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments