Skip to content
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

Template language for rules files #958

Closed
mwitkow opened this Issue Aug 3, 2015 · 7 comments

Comments

Projects
None yet
4 participants
@mwitkow
Copy link
Contributor

mwitkow commented Aug 3, 2015

I know this smells of template hell, but for our use case of federation (where we only federate precomputed metrics) we end up writing a lot of boiler plate.

Are you guys planning on providing a canonical rules file template language or should we bake something specific just for us? :)

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Aug 3, 2015

To be honest, I think building something for yourselves is the most realistic option.
Introducing a template system for rule files that then mixes up with other template languages of people's config management etc. might do more harm then good.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Aug 3, 2015

I don't think we'll ever add a template language, as I'm sure you've experienced it's easy for well intentioned factoring to gradually get out of control and land in template hell. If you feel the need to automatically generate rules, you can to do so with your configuration management language.

If you're ending up with a lot of boiler plate, it's possible you aren't taking full advantage of labels.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Aug 3, 2015

Perhaps we should have a "non-roadmap" section on prometheus.io containing all the non-goals?

There are a number of features that are obvious to ask for but which we do not intend to implement for not so obvious reasons...

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Aug 3, 2015

That sounds like a good idea.

@mwitkow

This comment has been minimized.

Copy link
Contributor Author

mwitkow commented Aug 3, 2015

The problem we're trying to solve is generating the pre-aggregations on our scrape-level proms that later on get sucked in by our master proms.

We end up with a much of similar rules that just end with :min, :max, :sum and :avg. Aggregating sums of histogram buckets (and _sum and _count) as well leads to tons of copy-pasting and "missing comma"-liek typos.

If you guys explicitly state a template language for prometheus as a non-goal, we'll roll our own :) I just wanted to make sure we wouldn't duplicate efforts :)

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Aug 3, 2015

Filed prometheus/docs#149 for the offroad-map. :)

@mwitkow mwitkow closed this Aug 3, 2015

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.