On 25/01/2021 22:15, Jeff Tippey wrote:
Hi,
I have a custom python container I wrote that exports metrics on
port 8001 at "/metrics". The setup used to work in Openshift 3.6 with
Prometheus. I'm using the Prometheus configuration from github at
prometheus github link
<https://github.com/openshift/origin/tree/release-3.11/examples/prometheus>.
In my deployment yamls for my container, For the list (in
deployment yaml) I have annotation
annotations:
prometheus.io/path <http://prometheus.io/path>: /metrics
prometheus.io/port <http://prometheus.io/port>: "8001"
prometheus.io/scrape <http://prometheus.io/scrape>: "true"
and the service definition I have
annotations:
prometheus.io/scrape <http://prometheus.io/scrape>: "true"
prometheus.io/scheme <http://prometheus.io/scheme>: http
prometheus.io/port <http://prometheus.io/port>: "8001"
To repeat, this worked in 3.6 configuration. However, when I open up
Prometheus this is not a target. Under Targets, none of my service
endpoints are showing up. I do see them in the service discovery but
they are being dropped. When, I look in the prometheus.yaml, it says
that it should scrape anything that is io.scrape = "true". Has
anyone experienced this issue or know why it would be dropping my
service endpoint scrapes that are defined as io.scrape="true".
If not, does anyone know where the reason they are dropped is logged
or how to access? I have been looking around and am at a loss right now.
Your help is greatly appreciated,
If you look through the relabling rules for the job you should be able
to see what is going on. Look at the details on the SD page and work out
which rule is dropping it. It should then suggest what you need to do to
make it work.
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/a3bfdcec-d0b3-c2c0-2d4e-cda1971a246a%40Jahingo.com.