Closed thampiotr closed 3 months ago
grr version v0.4.3
Prom alerts get updated after I change the jsonnet file.
repro git:(main) ✗ GRAFANA_URL=http://localhost:3000 grr watch -l debug ./ ./grizzly.jsonnet Providers: Grafana - active, Mimir - inactive (mimir address is not set), Synthetic Monitoring - inactive (stack id is not set) INFO[0000] Watching for changes INFO[0010] Changes detected. Parsing INFO[0010] Changes detected. Applying grizzly.jsonnet DEBU[0010] Getting the remote value for `PrometheusRuleGroup.test` PrometheusRuleGroup.test failed: missing tenant-id ERRO[0010] Error: 1 error occurred: * missing tenant-id
Use an example conifg:
{ prometheusAlerts+:: { groups: [ { name: 'test', rules: [ { alert: 'test_alert', expr: 'query', annotations: { message: 'message', }, 'for': '10s', }, ], }, ], }, }
Run GRAFANA_URL=http://localhost:3000 grr watch -l debug ./ ./grizzly.jsonnet.
GRAFANA_URL=http://localhost:3000 grr watch -l debug ./ ./grizzly.jsonnet
Change the config file and save it, observe the error quoted above.
Sorry, I have realised that this is because to sync alert rules, one needs to have the mimir related environment variables set. I wish the error message was more useful.
Grizzly Version
grr version v0.4.3
Expected Behavior
Prom alerts get updated after I change the jsonnet file.
Actual Behavior
Steps to Reproduce
Use an example conifg:
Run
GRAFANA_URL=http://localhost:3000 grr watch -l debug ./ ./grizzly.jsonnet
.Change the config file and save it, observe the error quoted above.