-
Notifications
You must be signed in to change notification settings - Fork 598
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
Remove kube-state-metrics labels form Kubernetes workload alerts #37
Comments
I agree; but isn't this up to the scape config? ie out of scope for the mixin? The mixin should only depend on labels from KSM for sure. |
Flip side of this is the "rule" that alerts should at least specify a job name (or at least, I recall that rule but can't find a reference to it). In this case do we have to have a job name, or is the KSM metric prefix (kube_) distinct enough? |
I think we are aligned, just want to give an example to make 100% clear what I mean. For example a possible alert you may receive today:
Because all services are configured/relabeled/scraped the same way, and all services get the |
@brancz I guess you already had an issue for this open? :) |
Let me update myself here because I don't know what I was thinking when I wrote the last comments. What we would like to do is not have the job selector whenever using kube-state-metrics metrics in alerts, except the KubeStateMetricsDown alert. The reason for this is: we perform metric relabeling on kube-state-metrics metrics dropping the @csmarchbanks @metalmatze @gouthamve @tomwilkie does this sound ok with you? (forget about everything I said in the previous comments) |
That seems reasonable to me, though does any work need to be done? If not using the |
You're totally right, there's nothing really to do for that. I was thinking about the |
This issue has not had any activity in the past 30 days, so the
Thank you for your contributions! |
It is often confusing for users, when there are alerts about Kubernetes workloads (deployments, daemonsets, statefulsets, etc) and it seems at first sight that it is coming from the kube-state-metrics target. We should probably drop any labels that identify kube-state-metrics and just leave the actual contextual information like the object name and namespace.
My hunch is that this would need to be configurable. I understand that for example in the Kausal ksonnet-prometheus package this would be the
instance
label, but in most other setups out there (such as the default Prometheus configuration from the Prometheus repo and the Prometheus Operator) this will be labels with the respective Kubernetes resource in it (pod/service/namespace/etc). It's also reasonable that people can do this however they like.@tomwilkie @metalmatze
The text was updated successfully, but these errors were encountered: