prometheus-engine icon indicating copy to clipboard operation
prometheus-engine copied to clipboard

examples: cert-manager podmonitoring manifest

Open ajayk opened this issue 3 years ago • 3 comments

Add an example for the basic cert-manager podmonitoring manifest to scrape the cert-manager metrics

ajayk avatar Jan 05 '23 16:01 ajayk

@pintohutch : ^^

ajayk avatar Jan 10 '23 18:01 ajayk

Thanks for the contribution @ajayk.

@yqlu - what's our policy here? Should new examples also come with a yaml snippet (example) of what the actual exporter setup should look like in addition to any PodMonitoring?

pintohutch avatar Jan 13 '23 17:01 pintohutch

Hi @ajayk

Thanks for the contribution!

Let's flesh out the README a bit more -- the other examples here link to documentation in which we try to guide the user through the whole process of integrating an application with Managed Service with Prometheus. The podmonitoring config is only one part of the puzzle. Can you include:

  1. a link to cert-manager itself (https://cert-manager.io/)
  2. a sample yaml snippet or instructions on how to configure cert-manager to export prometheus-format metrics. I haven't worked with cert-manager, but I found the following through a quick search:
    • https://cert-manager.io/docs/usage/prometheus-metrics/ , which says you want to set certain configs in the Helm chart or apply a patch to the container
    • the helm chart itself (https://github.com/cert-manager/cert-manager/blob/7c175c5d80fba53915ae6c98c5c0e7cde8f27615/deploy/charts/cert-manager/templates/deployment.yaml#L117) seems to suggest that the named port http-metrics (9402) is always exposed no matter what. Setting additional configs only matter for interoperability with prometheus-operator, not GMP with managed collection
  3. guidance on how to verify (2) is working -- for example, our Airflow instructions document how to run kubectl port-forward ... and access the port to check that metrics are available at that endpoint.
  4. podmonitoring -- you have this, great!
  5. guidance on how to verify that metrics are correctly ingested into GMP (again, refer to our published docs that ask the user to navigate to Metrics Explorer and run a given query.

yqlu avatar Jan 13 '23 19:01 yqlu