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

Feature request : variation value #4504

Open
Sach97 opened this Issue Aug 15, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Sach97
Copy link

Sach97 commented Aug 15, 2018

Proposal

Use case. Why is this important?

Hi guys great project :) I'm using prometheus collectors and prometheus to create alerts on financial data and the variation is quite useful to calculate the percent change of a value. I've implemented here https://github.com/Sach97/prometheus/tree/percent-change it needs some work as I've never programmed in go before but it doesn't change a lot from idelta. Let me know your suggestions / concerns and I'll make my pull request accordingly.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Aug 15, 2018

Thanks for your PR. This seems like a fairly niche use case outside of our scope. It would be quite susceptible to noise, and we also encourage alerting on state rather than transitions, as it's more resilient generally.

I'm presuming you have completely regular data, could you use something like idelta(x[1m]) / x offset 1m or idelta(x[1m]) / (x - idelta(x[1m])) ?

@Sach97

This comment has been minimized.

Copy link
Author

Sach97 commented Aug 15, 2018

I did'nt see the offse modifier in the documentation and it does the job thank's or the hint

@Sach97 Sach97 changed the title Feature request Feature request : variation value Aug 15, 2018

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