How do we add multiple httpchecks? Do I just repe...
# support
b
How do we add multiple httpchecks? Do I just repeat the entire httpcheck block?
Copy code
receivers:
  httpcheck:
    endpoint: <http://example.com>
    method: GET
    collection_interval: 10s
s
This is inconvenient, but with
httpcheck
one has to repeat. Alternatively, you can use something like blackbox exporter.
p
@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
With
httpcheck
:
Copy code
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.
Copy code
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
thanks, very helpful