alloy(shithubd scrape): enable_compression=false to dodge gzip parse bug
- SHA
4f60978d2f0ceef6c1f8736479efbe889c01b2ac- Parents
-
e2c3943 - Tree
79be0d5
4f60978
4f60978d2f0ceef6c1f8736479efbe889c01b2ace2c3943
79be0d5| Status | File | + | - |
|---|---|---|---|
| M |
deploy/ansible/roles/monitoring-client/templates/alloy-config.river.j2
|
12 | 3 |
deploy/ansible/roles/monitoring-client/templates/alloy-config.river.j2modified@@ -42,11 +42,20 @@ prometheus.scrape "node_exporter" { | ||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | // ── shithubd /metrics ─────────────────────────────────────────── |
| 45 | +// enable_compression = false: shithubd's HTTP middleware auto-gzips | |
| 46 | +// when the client advertises Accept-Encoding: gzip and correctly sets | |
| 47 | +// Content-Encoding: gzip on the response. Alloy 1.16's Prometheus | |
| 48 | +// scraper mis-handles that path: it parses the raw 0x1f gzip magic | |
| 49 | +// byte as text and the scrape fails with up=0. Disabling Accept- | |
| 50 | +// Encoding negotiation forces shithubd to return plain text. The | |
| 51 | +// /metrics payload is small enough that wire-size cost is irrelevant. | |
| 52 | +// Revisit once Alloy fixes the gzip-aware text parser upstream. | |
| 45 | 53 | prometheus.scrape "shithubd" { |
| 46 | 54 | targets = [ |
| 47 | 55 | { __address__ = "127.0.0.1:8080", job = "shithubd", __metrics_path__ = "/metrics" }, |
| 48 | 56 | ] |
| 49 | - forward_to = [prometheus.remote_write.grafana_cloud.receiver] | |
| 50 | - scrape_interval = "15s" | |
| 51 | - scrape_timeout = "10s" | |
| 57 | + forward_to = [prometheus.remote_write.grafana_cloud.receiver] | |
| 58 | + scrape_interval = "15s" | |
| 59 | + scrape_timeout = "10s" | |
| 60 | + enable_compression = false | |
| 52 | 61 | } |