2026-03-24 20:32:49 +01:00
2026-03-24 20:30:16 +01:00
2026-03-24 20:30:16 +01:00
2026-03-24 20:30:16 +01:00
2026-03-24 20:30:16 +01:00
2026-03-24 20:32:49 +01:00
2026-03-24 20:32:49 +01:00

ctlog-uptime-exporter

A Prometheus exporter for Certificate Transparency log uptime data published by Google at:

https://www.gstatic.com/ct/compliance/endpoint_uptime_24h.csv

The CSV reports the 24-hour uptime percentage for each CT log URL broken down by operation type (add-chain, get-entries, get-sth, etc.). This exporter fetches that CSV on a configurable schedule and exposes the data as Prometheus metrics.

Metrics

Metric Labels Description
ct_log_uptime_ratio log_url, endpoint 24h uptime as a ratio (0-1)
ct_log_uptime_fetch_success 1 if the last fetch succeeded, 0 otherwise
ct_log_uptime_fetch_timestamp_seconds Unix timestamp of the last fetch attempt

Standard go_* and process_* metrics are also exposed.

Usage

go build -o ctlog-uptime-exporter .
./ctlog-uptime-exporter

Metrics are served at http://localhost:9781/metrics.

Flags

Flag Default Description
-listen :9781 Address to listen on
-url https://www.gstatic.com/ct/compliance/endpoint_uptime_24h.csv URL of the uptime CSV
-interval 12h How often to fetch the CSV
-jitter 5m Maximum +/-jitter applied to the fetch interval

The exporter fetches the CSV once on startup, then repeats every -interval +/- a random value up to -jitter. This avoids thundering-herd effects if multiple instances run in parallel.

Example Prometheus scrape config

scrape_configs:
  - job_name: ctlog_uptime
    static_configs:
      - targets: ['localhost:9781']

License

Apache 2.0 - see LICENSE.

Description
No description provided
Readme 486 KiB
Languages
Go 90.9%
Dockerfile 9.1%