fix(monitoring): alloy enable_compression=false + manual install runbook fallback#32
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two real issues found while bringing up Grafana Cloud monitoring on shithub-prod:
1. shithubd scrape returns
up=0Alloy 1.16's prometheus scraper advertises `Accept-Encoding: gzip`. shithubd's HTTP middleware honors that and returns gzipped bytes with `Content-Encoding: gzip`. Alloy's parser then tries to read the raw `0x1f` gzip magic byte as text and fails:
```
last_error: expected a valid start token, got "\x1f" ("INVALID") while parsing
```
Workaround: `enable_compression = false` on the shithubd scrape block. Disables the negotiation entirely; shithubd returns plain text. Metrics payload is small enough that wire-size cost is irrelevant.
The actual root-cause fix belongs in either Alloy (handle Content-Encoding properly) or shithubd (skip compression on /metrics). This PR is just the operational unblock — filing a follow-up issue for the shithubd-side fix.
2. Operators without ansible can't bootstrap
The role assumes you have ansible installed and a real `inventory/production`. We don't, currently — the droplet was hand-built and there's no production inventory anywhere. New runbook section walks through applying the same actions over plain SSH so the next operator isn't blocked.
3. New troubleshooting entry
Added a "shithubd up=0 while node up=1" entry pointing at the gzip fix above, so the next person who hits this gets to the answer in seconds instead of an hour.
Test plan
Follow-ups (separate PRs)