1. What to monitor? #
Four complementary angles.
Angles #
| Question | Method | Example tool |
|---|---|---|
| Is the site responding, over HTTPS? | Scheduled HTTP/HTTPS synthetic test from several regions | Blackbox Exporter, k6, Uptime Kuma, Datadog Synthetics |
| Is the certificate about to expire? | Reading the TLS expiry date | probe_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])) > 2Good 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.
My progress
Sign in to track your progress and take notes. Sign in
💬 Recent discussions about this course
- Prometheus consomme 12 Go de RAM : comment trouver les métriques coupables ?✓ solved · 2 reply(ies)
- PromQL : quelle différence entre rate() et irate() ?✓ solved · 1 reply(ies)
Ask a question about this lesson →See all discussions about this course
Course Glossary
Alerting
The process of notifying teams (via email, Slack, Teams) when a specific event, threshold breach, or anomaly is detected.
Architecture
The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.
OpenTelemetry
An open source framework providing standards, APIs, and SDKs to collect and export observability data (traces, metrics, logs) in an agnostic way.
Recommended Articles
Browser testing and synthetic monitoring with k6
Test a web application in a real browser with the k6 browser module, measure Core Web Vitals, and...
Synthetic monitoring as code: industrializing synthetic scenario management
Learn how to integrate synthetic monitoring into your CI/CD pipelines for automated, resilient pe...
Synthetic Monitoring in Grafana Cloud
Continuously test site and API availability from public or private probes.
Prometheus: visualizing your metrics (UI, Grafana and dashboards)
Visualize Prometheus data: the web interface, PromQL graphs, connecting to Grafana, RED and USE d...
PromQL: an introduction to the Prometheus query language
Learn PromQL, the Prometheus query language: selectors, rate, sum by, histograms and first querie...
Prometheus best practices: metrics, cardinality, rules and operations
Prometheus best practices: metric naming, labels and cardinality, scrape intervals, recording rul...
Operating Thanos: monitoring, performance, troubleshooting and alternatives
Thanos operating best practices: key metrics and alerts, mixin, caches, limits, frequent errors a...
Grafana Alloy: The importance of Self-Monitoring
Discover why and how to configure Grafana Alloy so that it monitors itself, collecting its own lo...
Prometheus recording rules: speeding up your queries and dashboards
Understand and master Prometheus recording rules: evaluation, naming convention, pitfalls (ratios...