https://signoz.io logo
Title
b

Bill Cavalieri

12/20/2022, 5:25 PM
How do we add multiple httpchecks? Do I just repeat the entire httpcheck block?
receivers:
  httpcheck:
    endpoint: <http://example.com>
    method: GET
    collection_interval: 10s
s

Srikanth Chekuri

12/20/2022, 6:03 PM
This is inconvenient, but with
httpcheck
one has to repeat. Alternatively, you can use something like blackbox exporter.
p

Pranay

12/20/2022, 6:05 PM
@Srikanth Chekuri Can you share what would this look like for monitoring multile end points?
Possibly add an example of multiple health checks in our docs also - https://signoz.io/docs/monitor-http-endpoints/
s

Srikanth Chekuri

12/20/2022, 6:13 PM
With
httpcheck
:
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>
b

Bill Cavalieri

12/20/2022, 7:38 PM
thanks, very helpful