RousselTMLEARNING

Observability

Website monitoring: availability, HTTPS monitoring, certificates and performance

Set up website monitoring: availability and HTTPS checks, certificate expiry, response time, Core Web Vitals with RUM, logs and alerts, with open source tools (Prometheus Blackbox Exporter, Grafana k6, Uptime Kuma) or SaaS.

1. What to monitor? #

Four complementary angles.

Angles #

The angles of website monitoring
QuestionMethodExample tool
Is the site responding, over HTTPS?Scheduled HTTP/HTTPS synthetic test from several regionsBlackbox Exporter, k6, Uptime Kuma, Datadog Synthetics
Is the certificate about to expire?Reading the TLS expiry dateprobe_ssl_earliest_cert_expiry metric
Do visitors get a fast site?Real User Monitoring (LCP, INP, CLS)Grafana Faro, Datadog RUM, Dynatrace RUM
Does the server handle the load?Metrics and access logs (5xx codes, latency)Prometheus, Loki, Elasticsearch

2. HTTPS monitoring with Prometheus #

Open source and simple.

Blackbox Exporter #

# blackbox.yml
modules:
  https_2xx:
    prober: http
    timeout: 10s
    http:
      valid_status_codes: [200]
      fail_if_not_ssl: true
      preferred_ip_protocol: ip4
# prometheus.yml
scrape_configs:
  - job_name: site
    metrics_path: /probe
    params: { module: [https_2xx] }
    static_configs: [ { targets: [ "https://www.example.com", "https://shop.example.com" ] } ]
    relabel_configs:
      - { source_labels: [__address__], target_label: __param_target }
      - { source_labels: [__param_target], target_label: instance }
      - { target_label: __address__, replacement: blackbox:9115 }
# Alertes
probe_success == 0                                                   # site injoignable
(probe_ssl_earliest_cert_expiry - time()) / 86400 < 14               # certificat expirant sous 14 jours
histogram_quantile(0.95, rate(probe_duration_seconds_bucket[5m])) > 2
Good practice: Probe from at least two locations and alert when several fail: a local network outage should not wake up on-call.

3. Going further #

Journeys and real experience.

Journeys and RUM #

  • Journey tests (login, cart) with Grafana k6 in browser mode, scheduled or in CI.
  • RUM with Grafana Faro for real Core Web Vitals per page, browser and country.
  • A public status page fed by the same probes.
  • Correlation: a failing probe should lead to the backend's logs and traces.

Related articles

Conversion funnels in RUM: measuring where users drop off

Building and reading a conversion funnel with RUM data: steps, rates, order, pitfalls, and implementation in …

Prometheus recording rules: speeding up your queries and dashboards

Understand and master Prometheus recording rules: evaluation, naming convention, pitfalls (ratios, empty seri…

Prometheus on Kubernetes and the Prometheus web interface

Deploy Prometheus on Kubernetes with kube-prometheus-stack (Prometheus Operator, ServiceMonitor, Alertmanager…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!