Interview Prep/Monitoring & Observability/Prometheus scraping and targets

Target shows `x509: certificate signed by unknown authority`

IntermediateTroubleshootingPrometheus scraping and targets
Answer

Likely causes → The endpoint uses an internal CA that Prometheus does not trust.

Diagnose →

openssl s_client -connect app:8443 -showcerts </dev/null | openssl x509 -noout -issuer -subject -dates

Fix →

scheme: https
tls_config:
  ca_file: /etc/prometheus/certs/internal-ca.pem
  server_name: app.internal

insecure_skip_verify: true only as a short-term workaround.

Prevent → Distribute the internal CA bundle via cert-manager trust-manager or config management.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus scraping and targets