From 699c3680cd45a0933d9a786b20201a5e7c8bce5a Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Tue, 24 Mar 2026 20:32:49 +0100 Subject: [PATCH] Replace unicode chars --- README.md | 12 ++++++------ main.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0713c38..6934070 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ The CSV reports the 24-hour uptime percentage for each CT log URL broken down by | 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 | +| `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. @@ -34,9 +34,9 @@ Metrics are served at `http://localhost:9781/metrics`. | `-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 | +| `-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. +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 @@ -49,4 +49,4 @@ scrape_configs: ## License -Apache 2.0 — see [LICENSE](LICENSE). +Apache 2.0 - see [LICENSE](LICENSE). diff --git a/main.go b/main.go index c439c09..f69464a 100644 --- a/main.go +++ b/main.go @@ -28,7 +28,7 @@ func newExporter(reg prometheus.Registerer) *exporter { e := &exporter{ uptime: prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "ct_log_uptime_ratio", - Help: "24h uptime ratio (0–1) for a CT log endpoint, sourced from gstatic.com.", + Help: "24h uptime ratio (0-1) for a CT log endpoint, sourced from gstatic.com.", }, []string{"log_url", "endpoint"}), fetchOk: prometheus.NewGauge(prometheus.GaugeOpts{ Name: "ct_log_uptime_fetch_success", @@ -116,7 +116,7 @@ func main() { addr := flag.String("listen", ":9781", "address to listen on") csvURL := flag.String("url", "https://www.gstatic.com/ct/compliance/endpoint_uptime_24h.csv", "URL of the uptime CSV") interval := flag.Duration("interval", 12*time.Hour, "how often to fetch the CSV") - jitter := flag.Duration("jitter", 5*time.Minute, "maximum ±jitter applied to the fetch interval") + jitter := flag.Duration("jitter", 5*time.Minute, "maximum +/-jitter applied to the fetch interval") flag.Parse() reg := prometheus.NewRegistry()