-
Notifications
You must be signed in to change notification settings - Fork 176
A Promsonnet library for creating Prometheus Rules #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
beorn7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from my side. Jsonnet and general config language experts might still have something to say about this.
Duologic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concise, love it!
promsonnet/README.md
Outdated
| recording rules after the fact. (With lists, this requires iteration, and | ||
| is complex. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| recording rules after the fact. (With lists, this requires iteration, and | |
| is complex. | |
| recording rules after the fact, in contrast, lists require complex iteration logic. |
371b51c to
1e35b55
Compare
A simple library for rendering Prometheus rules. Provides a workaround for the issue that patching Prometheus alerts/recording rules is hard in Jsonnet, as individual elements in a list are not addressable. Under the bonnet, this stores rules in a map, then renders the required list late. The entries in the map can be patched, as demonstrated in the example
patch.jsonnet.Comments/thoughts/approvals welcome.