-
Notifications
You must be signed in to change notification settings - Fork 43
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
msg="target not found" for standard kube-state-metrics #279
Comments
I dug into the code a bit and determined what the issue is but I'm not sure how it could be fixed given how the code works today. The issue stems from the target look up, and getting a target from the Cache. We make a call
that attempts to "return the first target in the entry that matches all labels of the input set iff it has them set." Prometheus targets have a I have fixed this by just deploying |
I have had the same problem with this sidecar and kube-state-metrics, in my case the only solution I have found is to modify the Prometheus ServiceMonitor (I am using https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/templates ) The serviceMonitor that it generates for the kube-state-metrics metrics scrape takes a literal value for honorLabels of true: Changing it to false I get that in the face of the label namespace conflict it generates 2 labels:
I have not reviewed all the metrics but I suppose that some will exceed the 10 labels because of this, perhaps in such cases a relabeling can be performed to delete the labels that I do not need. |
Building on @forestoden and @vmcalvo's findings, my recent comment in #229 might be relevant as well. |
I am trying to set up the stackdriver-prometheus-sidecar to push a few CronJob/Job metrics from
kube-state-metrics
to Stackdriver. I'm running into an issue where no matter what I do, all of the metrics reportHere is my config for the sidecar:
I am using the Prometheus operator, with Prometheus version 2.18. I tried a couple different versions (up to 2.22) with no luck.
I am not seeing any metrics get to Stackdriver, I've tried adding
--stackdriver.store-in-files-directory=/prometheus/sd
and see a file get created but nothing is written to it, so it doesn't seem like a permissions issue there.For the
--include
flag, I've tried a number of different ways with no luck.I found #104 which highlights a similar log message but I think that use case is a bit more complex than this
The text was updated successfully, but these errors were encountered: