grafana / grafonnet

Jsonnet library for generating Grafana dashboards.
https://grafana.github.io/grafonnet/
Apache License 2.0
352 stars 19 forks source link

Missing fields from alerting rule preventing it to be used with Grafana API #181

Closed hjerslin-github closed 4 months ago

hjerslin-github commented 6 months ago

I'm trying to use grafonnet to define alert rules to be uploaded using this API https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/#route-post-alert-rule.

My assumption is that I should use this grafonnet API https://grafana.github.io/grafonnet/API/alerting/ruleGroup/rule/index.html

The problem is that several of the body parameters are missing (Even mandatory ones). Full definition: https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/#provisioned-alert-rule

Can these please be added in? https://github.com/grafana/grafonnet/blob/main/generator/alerting.libsonnet#L221

I'm not sure if I'm misunderstanding something?