mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Add Monitor group name to metric labels #2690
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#2690
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mhkarimi1383 on GitHub (Oct 16, 2023).
⚠️ 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
groupin metrics❓ Alternatives
No response
📝 Additional Context
No response
@Craftoncu commented on GitHub (Feb 28, 2024):
+1
@Craftoncu commented on GitHub (Mar 8, 2024):
+1, not a spam. This is essentially for managing the data inside of grafana to build feature-rich dashboards
@CommanderStorm commented on GitHub (Mar 8, 2024):
Disagree.
+1on 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.
@CommanderStorm commented on GitHub (Mar 8, 2024):
@mhkarimi1383
It is not clear to me how this feature should work.
A monitor can be in multiple groups ⇒ how should this be labelled?
@mhkarimi1383 commented on GitHub (Mar 9, 2024):
@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
@CommanderStorm commented on GitHub (Mar 9, 2024):
You are not making a lot of sense to me.
What do you mean with this? How would you need this be labelled concretely?
@mhkarimi1383 commented on GitHub (Mar 9, 2024):
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
@CommanderStorm commented on GitHub (Mar 11, 2024):
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.
@Craftoncu commented on GitHub (Mar 11, 2024):
Its not about wrapping objects. Its about adding new information to the single line.
I think this should be the
/metricsoutput.@Craftoncu commented on GitHub (Mar 11, 2024):
Its just a new kv pair inside the json object.
@CommanderStorm commented on GitHub (Mar 11, 2024):
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?
@mhkarimi1383 commented on GitHub (Mar 13, 2024):
Yap
I think that's Ok, we are having groups as monitors and they can be parents and/or children for others
@CommanderStorm commented on GitHub (Mar 13, 2024):
Only selectively answering questions is quite painfull.
@Craftoncu commented on GitHub (Mar 13, 2024):
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
@Craftoncu commented on GitHub (Apr 5, 2024):
Are there any news about it? I tried to implement the changes yesterday in my lunch, but failed.
@CommanderStorm commented on GitHub (Apr 5, 2024):
See https://github.com/louislam/uptime-kuma/pull/4472
I don't know what is the best-practice in this situation
Please have a look at https://github.com/louislam/uptime-kuma/pull/898 for a related PR which had a prerequesite merged recently.
@CommanderStorm commented on GitHub (Oct 1, 2024):
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