Open mhkarimi1383 opened 1 year ago
+1
+1, not a spam. This is essentially for managing the data inside of grafana to build feature-rich dashboards
+1, not a spam
Disagree. +1
on issues just makes issue-management harder.
Issues are for discussing what needs to be done how by whom.
You can use 👍🏻 on issues to show your support instead, as always: Pull Requests welcome.
@mhkarimi1383 It is not clear to me how this feature should work. A monitor can be in multiple groups ⇒ how should this be labelled?
@CommanderStorm As long as we are not having a lot of group names we could have multiple metrics for the same monitor since, I know It's not recommended since it could make a lot of metrics and it's not good for Prometheus
But we could make this feature configurable and disable it by default
we could have multiple metrics for the same monitor since
You are not making a lot of sense to me. What do you mean with this? How would you need this be labelled concretely?
we could have multiple metrics for the same monitor since
You are not making a lot of sense to me. What do you mean with this? How would you need this be labelled concretely?
We are making SLA dashboards with the help of Prometheus metrics, but we are not able to categorize things, because we are not having access to group or tags from there
That is not what I asked. I asked how the metrics would need to be labeled concretely.
Our group monitors are hierarchical (a group can contain a group), while Prometheus (as far as I can tell only supports Key/value pairs.
Its not about wrapping objects. Its about adding new information to the single line.
I think this should be the /metrics
output.
- monitor_response_time{monitor_name="UPTIME REFERENCE GOOGLE.COM",monitor_type="http",monitor_url="https://google.com",monitor_hostname="null",monitor_port="null"} 200
+ monitor_response_time{monitor_name="UPTIME REFERENCE GOOGLE.COM",monitor_type="http",monitor_url="https://google.com",monitor_hostname="null",monitor_port="null",monitor_parent="**THIS_IS_THE_PARENT_NAME**"} 200
Its just a new kv pair inside the json object.
What would you put under **THIS_IS_THE_PARENT_NAME**
exactly?
I think we are unclear about prerequesits. Are you aware that groups can contain groups?
Group A
|--> Monitor B
|--> Group B
|--> Monitor C
Are you aware that groups can contain groups?
Group A |--> Monitor B |--> Group B |--> Monitor C
Yap I think that's Ok, we are having groups as monitors and they can be parents and/or children for others
Only selectively answering questions is quite painfull.
What would you put under
**THIS_IS_THE_PARENT_NAME**
exactly?
Jup, Im aware of that. What about chaining these? Like GroupA/Group/B
There is the opportunity to build complex selection strategy in Grafana. But for this the groups should be available
Are there any news about it? I tried to implement the changes yesterday in my lunch, but failed.
What about chaining these? Like GroupA/Group/B
See https://github.com/louislam/uptime-kuma/pull/4472
I don't know what is the best-practice in this situation
Are there any news about it
Please have a look at https://github.com/louislam/uptime-kuma/pull/898 for a related PR which had a prerequesite merged recently.
Thinking about it:
Maybe replacing the individual group names with .replace("/", "|")
and then joining with /
could work.
If someone wants to invest the time to add this feature, the code for this is avaliable here
⚠️ Please verify that this feature request has NOT been suggested before.
🏷️ Feature Request Type
API, Other
🔖 Feature description
Hi
Making monitors group name available in metric labels will be great when creating dashboads in Grafana
✔️ Solution
Add a label named
group
in metrics❓ Alternatives
No response
📝 Additional Context
No response