You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
937 B

  1. # Configuring Prometheus
  2. Healthchecks.io supports exporting metrics and check statuses to
  3. [Prometheus](https://prometheus.io/), for use with [Grafana](https://grafana.com/).
  4. You can generate the metrics export endpoint by going to your project settings
  5. and clicking "Create API Keys." You will then see the link to
  6. the Prometheus endpoint:
  7. ![Project's API Keys](IMG_URL/prometheus_endpoint.png)
  8. ## Update the prometheus.yml
  9. You can copy the Prometheus endpoint URL and add it to the Prometheus configuration:
  10. ```yaml
  11. - job_name: "healthchecks"
  12. scrape_interval: 60s
  13. scheme: SITE_SCHEME
  14. metrics_path: /projects/45sd78-eeee-dddd-8888-b25a9887ecfd/metrics/NXyGzks4s8xcF1J-wzoaioyoqXIANGD0
  15. static_configs:
  16. - targets: ["SITE_HOSTNAME"]
  17. ```
  18. Notice how we split up the URL and paste in the scheme, domain, and path separately.
  19. Reload Prometheus, and your changes should be live, coming in under the `hc_` prefix.