Skip to content

Commit 75cae20

Browse files
authored
fix(prometheus): quote external_labels values in YAML template (#447)
## Summary - Add double quotes around `$SERVICE_OWNER`, `$CLUSTER_NAME`, `$CLUSTER_PEER` and `$PROM_REMOTE_WRITE_TOKEN` in `prometheus.yml.example` - Values substituted by `sed` in `run.sh` can contain YAML-special characters (`#`, `:`, `[`, etc.) that break config parsing - `$ALERT_DISCORD_IDS` was already quoted — this aligns the rest ## Test plan - [ ] `docker compose up -d` with `CLUSTER_NAME` containing `#` or `:` characters - [ ] Verify prometheus starts and external_labels appear correctly
1 parent 5b53831 commit 75cae20

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

prometheus/prometheus.yml.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ global:
22
scrape_interval: 30s # Set the scrape interval to every 30 seconds.
33
evaluation_interval: 30s # Evaluate rules every 30 seconds.
44
external_labels:
5-
service_owner: $SERVICE_OWNER # replace this with your Operator name you want to be identified by, it helps us route alerts and metrics to your notification channels easily
6-
cluster_name: $CLUSTER_NAME
7-
cluster_peer: $CLUSTER_PEER
5+
service_owner: "$SERVICE_OWNER" # replace this with your Operator name you want to be identified by, it helps us route alerts and metrics to your notification channels easily
6+
cluster_name: "$CLUSTER_NAME"
7+
cluster_peer: "$CLUSTER_PEER"
88

99
remote_write:
1010
- url: https://vm.monitoring.gcp.obol.tech/write
1111
authorization:
12-
credentials: $PROM_REMOTE_WRITE_TOKEN
12+
credentials: "$PROM_REMOTE_WRITE_TOKEN"
1313
write_relabel_configs:
1414
- source_labels: [job]
1515
regex: "charon|mev-boost"

0 commit comments

Comments
 (0)