-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Feat] support splitting single graph into multiple graphs via imagefilters #41
base: main
Are you sure you want to change the base?
Conversation
Hi, thanks for the PR. I'll have a look at it. Could you please check the failed phpcs jobs and fix the code style accordingly. Also this change would require some new documentation in the docs/ |
2777765
to
3c01a4b
Compare
The code style checks should pass now.
You can also use the following Grafana Dashboard Template see this change in action: |
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.
Hi,
I had a closer look at and discussed it internally.
-
This feature is somewhat already covered with the custom graphs "Metrics per panel" setting.
The implementation in this PR would introduce another way and thus more complexity.
We're wondering if it's possible to implement this via the existing custom graphs? -
The implementation needs some improvement. I tested the branch and without the new custom var
I don't see any graphs for other services?
Having the URLs in the custom var is also a bit error prone, maybe it's possible just to have the
metric per graph
value and build the URL in PHP. -
Maybe we can improve the name
grafanaimagefiltersarray
and documentation for it (if we keep this implementation)
Regards,
Markus
Hi, What this feature effectively adds, is the possibility to configure graphs based on hosts, which was not easily possible before, since the Graph matching logic only uses The specifics of the implementation are not my strong suit (I leave that to @martialblog ), I will just share some thoughts about the general design. This PR adds a third layer of configuration to the module, besides the module configuration itself and what is done in Grafana. Now there is some configuration in Icinga 2, too. PS: I don't know how representative your example ( PPS: Since you seem to be in/from Erlangen, we also can meetup in ZAM sometime if you would like to talk about the topic in person. :-) |
Unfortunately this is not the solution I was looking for, because with the "Metric per panel" setting
This is indeed true and was an oversight in my implementation, which i have fixed with my latest commit (37ffe7f).
From my point, it was specifically designed that way to provide flexibility in modifying graphs for specific services only, which can be easily achieved by setting "Custom Variables" in the Icinga service.
Yes, I agree that the name grafanaimagefiltersarray is the best and I am open for any suggestions (custom_vars is something that comes to my mind).
But as far as I know, these panels can not be included in a service, but only shown in the "Grafana Graphs" Dashboard.
Yes, but this only works for a maximum of two metrics per graph, by specifying the metrics, which should be separated into separate graphs. In Icinga, this can be achieved for more than two metrics. Additionaly, the configuration can be varied for different services.
Here would be another example where it is also be very helpful to have separate graphs for these metrics inside the Icinga service: |
e56fecd
to
37ffe7f
Compare
Summary
This change allows the Grafana graph to be split into multiple separate graphs.
This is useful, if multiple values are plotted into the same graph and their value ranges are quite different. So small value changes are much more visible.
Here is an example with and without this change:
Without change
With change
Configuration
The values, which should be separated into an additional graph are specified via the
Custom variable
grafanaimagefiltersarray
.Each entry inside the

grafanaimagefiltersarray
defines a new graph and its value specifies which value should be omitted via avar-metricfilter
. See the following example: