Reputation: 2531
can someone answer me the following questions, otherwise it's a little unclear to me.
How do I understand and where to look what annotations exist at all? Is there a list somewhere or template?
Standard annotations work and prometheus sees this service. Everything is ok with this.
annotations: prometheus.io/scrape: 'true' prometheus.io/path: '/actuator/prometheus' prometheus.io/port: '8700'
But the service is displayed as Endpoint IP. Is there any possibility, setting, so that not Endpoint IP is displayed in prometheus targets, but the service name and namespace?
Thanks
Upvotes: 0
Views: 5326
Reputation: 3463
I'll try and give you some answer based on what I understand from your question.
values.yaml
file under the relabel_configs
section. You'll find blocks like this one relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
action: keep
regex: true
This means that all the ressource of this job that has the prometheus.io/scrape
annotation with the value true
will be scrapped.
Yes, this is normal based on the content of the values.yaml
file.
On the target page, Prometheus will always print the IP address under the Endpoint column. However you can play with the configuration in order to print the namespace and ressource name under the Labels column if it's not already here.
Upvotes: 1