Resource relation metrics #2424
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What would you like to be added:
It would be great if KSM had an optional set of metrics which would describe relations between resources.
For example:
Why is this needed:
This would give a possibility to query relation changes over time. Also it would allow to create smarter and more detailed alerts about changes to configuration.
Describe the solution you'd like
If the label combinations are not frequently changing it should not have a big impact on memory usage for Prometheus or any other tool that is going to scrape and persist those metrics.
kube_ingress_relation{ingress="name-of-the-ingress", service="name-of-the-service", namespace="name-of-the-namespace"} 1 kube_service_relation{service="name-of-the-service", pod="name-of-the-pod", namespace="name-of-the-namespace"} 1 kube_hpa_relation{hpa="name-of-the-hpa", deployment="name-of-the-deployment", namespace="name-of-the-namespace"} 1
Possibly using resource uids might give better insight while being less fragile.
Additional context
This idea came from trying to develop Grafana Scenes App for Kubernetes to display cluster state based on collected metrics. If we would have metrics describing relations we could easily query state & alerts for related sources and build a full picture about the current state at any given time.
The text was updated successfully, but these errors were encountered: