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
Threshold line #35
Comments
Do you mean a constant horizontal line? In that case, you can generate those in Graphite. So adding a metric like this in your {
"alias": "Treshold",
"target": "constantLine(100)",
"renderer": "line"
} For more information on functions available in Graphite, check out http://graphite.readthedocs.org/en/latest/functions.html#graphite.render.functions.constantLine |
Yes, a constant horizontal line across the graph. I tried your example and it works for a single target but not when there is multiple targets in metric. With multiple targets, the threshold is a bar in the middle of the graph which gets expanded in width as the graph gets refreshed (5secs). This happens when viewing the graph with the latest 10min period view. |
I'm not sure I understand what you're trying to achieve, but you could perhaps try setting multiple targets with a |
I need to clarify my issue better.. Here is my definition and in the graph sample below the threshold line is not drawn constant as it should. Also the actual metric (logintime) is affected a bit by the threshold line. |
Ok, now things are a little clearer. One thing I noticed however is that So it looks like maybe it's only used when graphite is rendering a graph by itself. If that's the case, and there's no way to tell graphite to simply return a an array of constant values via json, then this is something that could potentially be implemented inside Giraffe, but a) I'm not sure how much time I have right now for this; and b) I'd rather deal as little as possible with rendering or mocking data, and perhaps it makes sense to submit a pull request to the graphite project to support returning constantLine via json. @aeirola - any thoughts? |
/render?from=-1440minutes&target=constantLine(4000)&format=json on my graphite gives: |
which version of graphite are you using? On 24 July 2013 09:12, cscmvi notifications@github.com wrote:
|
Installed Packages more /etc/redhat-release |
maybe it's a local problem on my own graphite then. I'll try to take a On 24 July 2013 10:01, cscmvi notifications@github.com wrote:
|
Yeah, apparently it doesn't work as nicely as I originally though. I just tested the function it quickly by drawing an image with the render API. Apologies for the false hope. I have the same issue with getting an internal server error when trying to render a constantLine using JSON formatting. Rendering images or CSV works fine. I'll put up an issue on the graphite-web project for this, as there doesn't seem to be one yet. The quick fix for your situation would be to hack together a constant value from a existing metric. So for example something like this will give you a (ugly) constant line For Giraffe, I think it would be best to rely on Graphite for all data sources. So we should work to fix the issue in Graphite and then just use the |
The graphite-web issue can be found at graphite-project/graphite-web#375 |
The quick fix seems OK for now until the right solution arrives. I was also thinking to feed a threshold value into carbon from my metrics collector. The benefit would be to see the change history of the threshold itself(?). Also it would be easier to get alerts working if the metric threshold could be read from graphite together with the actual metric. Thanks for your time guys and for helping me out with this so quickly. |
Very clever @aeirola ! I would never have thought about this. And happy to hear it's working for you @cscmvi. Yeah, it's not an ideal solution, but hopefully graphite will fix this at some point and that would be useful also for other dashboard/projects perhaps. Hope it's ok to close this for now, but feel free to re-open or open another issue if you need more help. |
Hello,
How can one draw a threshold line in giraffe?
Best regards,
Marko
The text was updated successfully, but these errors were encountered: