Skip to content

External metrics

Kirill K edited this page Dec 14, 2023 · 4 revisions

One may want not to check website with just single blackbox exporter.

Self-hosted monitoring infrastructure

You may use multiple blackbox_exporters in various regions and scrape all of them.

Webside may be considered available in case at least n% of checks were successful.

Rely on external services

This may be your cloud provider's LB metrics or external monitoring service.

For example, you may want to use service like Pingdom to check if website is available.

Then just scrape metrics from pingdom-exporter.

This is how to achieve so:

  1. Install exporter, check relevant exporter docs on how to do so.

  2. Point pagetron to exporter and tune query:

    values.yaml

    query1m: |-
      label_replace(
        sum by (hostname) (
          pingdom_up == bool 1
        ),
        "instance", "$1", "hostname", "(.+)"
      )
    
    customMetricSources:
      - job_name: pingdom-exporter
        scheme: http
        metrics_path: /metrics
        static_configs:
          - targets:
              - pingdom-exporter:9158
    

For provider metrics, just use appropriate exporter and count e.g. "successful requests vs total requests count":

query1m: |-
  load_balancer.requests_count_per_second{code="[2-4].."}
  /
  load_balancer.requests_count_per_second{code=".+"}
  >= bool 0.999
Clone this wiki locally