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.

72 lines
2.2 KiB

  1. {% extends "base.html" %}
  2. {% load humanize static hc_extras %}
  3. {% block title %}Add Prometheus - {% site_name %}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <h1>Prometheus</h1>
  8. <p>
  9. {% site_name %} provides a
  10. <a href="https://prometheus.io">Prometheus</a>-compatible metrics endpoint
  11. for each project. The endpoints are secured using each project's
  12. read-only API key.
  13. If your team uses Prometheus, you can configure it to scrape {% site_name %}
  14. and have up-to-date check and tag status values available in Prometheus.
  15. </p>
  16. <h2>Setup Guide</h2>
  17. <div class="row ai-step">
  18. <div class="col-sm-6">
  19. <span class="step-no"></span>
  20. <p>
  21. Look up your project's read-only API key in
  22. <strong>Project Settings › API Access</strong>.
  23. </p>
  24. <p>
  25. If you have not generated API keys before, you will need to do that
  26. first.
  27. </p>
  28. </div>
  29. <div class="col-sm-6">
  30. <img
  31. class="ai-guide-screenshot"
  32. alt="Click create integration button"
  33. src="{% static 'img/integrations/setup_prometheus_1.png' %}" />
  34. </div>
  35. </div>
  36. <div class="row ai-step">
  37. <div class="col-sm-12">
  38. <span class="step-no"></span>
  39. <p>
  40. Edit Prometheus configuration and add a new section in the
  41. <code>scrape_configs</code> section.
  42. </p>
  43. <pre>
  44. - job_name: 'healthchecks-{{ project|slugify }}'
  45. scheme: {% site_scheme %}
  46. metrics_path: /projects/{{ project.code }}/metrics/<strong>YOUR-READ-ONLY-API-KEY</strong>
  47. static_configs:
  48. - targets: ['{% site_hostname %}']</pre>
  49. </div>
  50. </div>
  51. <div class="row ai-step">
  52. <div class="col-sm-6">
  53. <span class="step-no"></span>
  54. <p>
  55. Reload Prometheus' configuration. You should now start seeing
  56. {% site_name %} data appear in Prometheus.
  57. </p>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. {% endblock %}