Closed DanielHoffmann1 closed 4 years ago
I don't see how this could be done with the data architecture used in Grafana. The panels themselves define the data sources and queries, but it is Grafana that performs the queries and calls the data-received method of the panel when it arrives. I don't see how the panel could initiate a separate query to a different data source etc. outside this regular update cycle.
Maybe I could map table data columns to the limit values as an option, in place of the static values I now have. That would work and even allow per-label limits (something someone else was interested in). Not sure how to display the limit lines though, but it is an interesting idea. It would mean adding a limit column (or columns) to every data row in the table data set, which might be more trouble that it is worth.
Along the same lines though, I've been thinking of using user-defined formulas for all the values. So you could, for example display the ratio of two values, or the difference etc.
These ideas could be really useful in certain applications, though I worry that it makes it harder for regular folks to set it up in the first place. All the configuration options I now have are already daunting to most users.
M
On Wed, Apr 3, 2019, 9:19 AM DanielHoffmann1 notifications@github.com wrote:
Hello, it's a topic addressing also the official grafana developer, but the discussion keeps on since a couple of years.. Is it possible to integrate dynamic thresholds, e.g. warn/ crit values read out from a database like whisper? There are some limitations with ranges, of course. But at least a warn/ crit value from a query would be useful, when you use templates to show some metrics.
Thank you!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/michaeldmoore/michaeldmoore-multistat-panel/issues/16, or mute the thread https://github.com/notifications/unsubscribe-auth/ADjVrhmFa7rs4hlAyfsd27qL4HWhGEuPks5vdFYRgaJpZM4cZyPP .
Dear Michael,
thank you very much for your quick and detailed answer!
The idea you proposed is more or less exactely what I mean. Instead of hand-typed threshold values I would like to use a value read out of a Whisper DB in my case. Whipser stores some thresholds coming from Icinga2 - so I can use the same database space to get the values for my warn/ crit thresholds.
Of course I cannot store ranges in whisper. Like 0 < n > 4 = crit; n <> 2 = warn. But I have already single values like warn = 3, crit = 4 in my database so I would like to map this values to the thresholds (for example warn = #B; crit = #C).
Finally I only want to adapt the color of the column depending on the state - like one can do it already with the hand-typed values. At this moment I use also an indicator beside the current values to show the thresholds using this queries. Also here it would be useful to see the real value in a templated view instead of a generic value.
The update cycle can be a matter to show the correct value, since it should be static. But I didn't see a problem until now with my panels.
If there's a uncomplicated way to realize this feature I would be very glad if you can implement it.
Best regards
Daniel
Gesendet: Mittwoch, 03. April 2019 um 09:49 Uhr Von: "michaeldmoore" notifications@github.com An: michaeldmoore/michaeldmoore-multistat-panel michaeldmoore-multistat-panel@noreply.github.com Cc: DanielHoffmann1 hoffmann167@web.de, Author author@noreply.github.com Betreff: Re: [michaeldmoore/michaeldmoore-multistat-panel] Dynamic thresholds (#16)
I don't see how this could be done with the data architecture used in Grafana. The panels themselves define the data sources and queries, but it is Grafana that performs the queries and calls the data-received method of the panel when it arrives. I don't see how the panel could initiate a separate query to a different data source etc. outside this regular update cycle.
Maybe I could map table data columns to the limit values as an option, in place of the static values I now have. That would work and even allow per-label limits (something someone else was interested in). Not sure how to display the limit lines though, but it is an interesting idea. It would mean adding a limit column (or columns) to every data row in the table data set, which might be more trouble that it is worth.
Along the same lines though, I've been thinking of using user-defined formulas for all the values. So you could, for example display the ratio of two values, or the difference etc.
These ideas could be really useful in certain applications, though I worry that it makes it harder for regular folks to set it up in the first place. All the configuration options I now have are already daunting to most users.
M
On Wed, Apr 3, 2019, 9:19 AM DanielHoffmann1 notifications@github.com wrote:
Hello, it's a topic addressing also the official grafana developer, but the discussion keeps on since a couple of years.. Is it possible to integrate dynamic thresholds, e.g. warn/ crit values read out from a database like whisper? There are some limitations with ranges, of course. But at least a warn/ crit value from a query would be useful, when you use templates to show some metrics.
Thank you!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/michaeldmoore/michaeldmoore-multistat-panel/issues/16, or mute the thread https://github.com/notifications/unsubscribe-auth/ADjVrhmFa7rs4hlAyfsd27qL4HWhGEuPks5vdFYRgaJpZM4cZyPP .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Sorry for leaving this un-answered for so very long.
I just released a new version of Multistat (v1.3.0) with support for an array of recoloring rules based on values in the data set. I think this might do what you wanted back in the day when you opened this issue.
Thresholds and flashing attributes are not over-ridden, I can't see how this would work on a per-bar basis and, as explained earlier - Grafana does not provide a way to access data outside the data returned in the query. If I'm missing something here - let me know.
It might take the Grafana team a few weeks to get approve and promote this to the official repo - though they have been getting much quicker at this recently, so maybe not too long at all. In the meantime, you can grab the updated release from this repo.
Take a look if you are still interested and let me know if you see anything you still need. Cheers, Michael Moore
Hello, it's a topic addressing also the official grafana developer, but the discussion keeps on since a couple of years.. Is it possible to integrate dynamic thresholds, e.g. warn/ crit values read out from a database like whisper? There are some limitations with ranges, of course. But at least a warn/ crit value from a query would be useful, when you use templates to show some metrics.
Thank you!