tenseleyflow/shithub / 4f60978

Browse files

alloy(shithubd scrape): enable_compression=false to dodge gzip parse bug

Authored by espadonne
SHA
4f60978d2f0ceef6c1f8736479efbe889c01b2ac
Parents
e2c3943
Tree
79be0d5

1 changed file

StatusFile+-
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" {
4242
 }
4343
 
4444
 // ── 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.
4553
 prometheus.scrape "shithubd" {
4654
   targets = [
4755
     { __address__ = "127.0.0.1:8080", job = "shithubd", __metrics_path__ = "/metrics" },
4856
   ]
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
5261
 }