Replace unicode chars

This commit is contained in:
2026-03-24 20:32:49 +01:00
parent edc8f4296a
commit 699c3680cd
2 changed files with 8 additions and 8 deletions

View File

@@ -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 (01) |
| `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).

View File

@@ -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 (01) 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()