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
CodePudding user response:
I'll try and give you some answer based on what I understand from your question.
- About the annotations : to know wich are the one used by the Helm chart, well there is no magic here, you need to read the templates files. Although, most of those annotations are listed in the
values.yaml
file under therelabel_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.
CodePudding user response:
@MarcABOUCHACRA Thanks for the answer.
You did not understand me. I'm not talking about helm values. I'll say it differently. Where can I see possible annotation options? What other annotations are there at all? Where are they described on the prometheus page? So that I understand what other things I can configure using annotations. prometheus.io/scrape, prometheus.io/path, prometheus.io/port:....
You didn't understand me. I'm not talking about helm values. Described in more detail in paragraph 1.
Is this the crux of my question? Where can I see a list of all possible annotations?