I have springboot and non-springboot (Eclipse Microprofile) Rest APIs running in openshift . Both are have service endpoint port 9443
SpringBoot metrics path - /actuator/prometheus Eclipse Microprofile metrics path /metrics
Eclipse Microprofile scrape config
- job_name: 'microprofile-metric'
scrape_interval: 1m
metrics_path: /metrics
scheme: https
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
kubernetes_sd_configs:
- role: endpoints
Springboot scrape config
- job_name: 'springboot-metric'
scrape_interval: 1m
metrics_path: /actuator/prometheus
scheme: https
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
kubernetes_sd_configs:
- role: endpoints
As the MP metrics are not available in springboot apps, seeing WARN of NOT Found endpoint (/metircs) in the application logs and same is the case with microprofile apps - /actuator/prometheus endpoint not found.
How can I can configure proemtheus scraping ?
Thanks Raj