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.

18 lines
1.7 KiB

  1. <h1>Configuring Prometheus</h1>
  2. <p>SITE_NAME supports exporting metrics and check statuses to
  3. <a href="https://prometheus.io/">Prometheus</a>, for use with <a href="https://grafana.com/">Grafana</a>.</p>
  4. <p>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:</p>
  7. <p><img alt="Project's API Keys" src="IMG_URL/prometheus_endpoint.png" /></p>
  8. <h2>Update the prometheus.yml</h2>
  9. <p>You can copy the Prometheus endpoint URL and add it to the Prometheus configuration:</p>
  10. <div class="highlight"><pre><span></span><code> <span class="p p-Indicator">-</span> <span class="nt">job_name</span><span class="p">:</span> <span class="s">&quot;healthchecks&quot;</span>
  11. <span class="nt">scrape_interval</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">60s</span>
  12. <span class="nt">scheme</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">SITE_SCHEME</span>
  13. <span class="nt">metrics_path</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">/projects/45sd78-eeee-dddd-8888-b25a9887ecfd/metrics/NXyGzks4s8xcF1J-wzoaioyoqXIANGD0</span>
  14. <span class="nt">static_configs</span><span class="p">:</span>
  15. <span class="p p-Indicator">-</span> <span class="nt">targets</span><span class="p">:</span> <span class="p p-Indicator">[</span><span class="s">&quot;SITE_HOSTNAME&quot;</span><span class="p p-Indicator">]</span>
  16. </code></pre></div>
  17. <p>Notice how we split up the URL and paste in the scheme, domain, and path separately.</p>
  18. <p>Reload Prometheus, and your changes should be live, coming in under the <code>hc_</code> prefix.</p>