Slackbot
12/20/2022, 5:25 PMSrikanth Chekuri
12/20/2022, 6:03 PMhttpcheck
one has to repeat. Alternatively, you can use something like blackbox exporter.Pranay
Pranay
Srikanth Chekuri
12/20/2022, 6:13 PMhttpcheck
:
receivers:
...
httpcheck:
endpoint: <http://example.com>
method: GET
collection_interval: 10s
httpcheck/service-a:
endpoint: <http://service-a.com/health>
method: GET
collection_interval: 2s
httpcheck/service-b:
endpoint: <http://service-b.com/probe>
method: HEAD
collection_interval: 5s
...
With prometheus black box exporter this becomes little easier if there is common config most targets.
config:
modules:
http_2xx:
prober: http
timeout: 2s
http:
follow_redirects: true
...
scrape_configs:
- job_name: blackbox
metrics_path: /probe
params:
module:
- http_2xx
...
- targets:
- <http://endpoint-1>
- <https://endpoint-2>
- <http://service-b.com>
Bill Cavalieri
12/20/2022, 7:38 PM