Browse Source

Create configuring_prometheus.md

Add documentation on how to export metrics to prometheus.
pull/387/head
Ivan Smirnov 4 years ago
parent
commit
0b5fa40f68
2 changed files with 28 additions and 1 deletions
  1. +26
    -0
      templates/docs/configuring_prometheus.md
  2. +2
    -1
      templates/front/base_docs.html

+ 26
- 0
templates/docs/configuring_prometheus.md View File

@ -0,0 +1,26 @@
# Configuring Prometheus
Healthchecks.io supports exporting metrics and check statuses to [Prometheus](https://prometheus.io/), for use with [Grafana](https://grafana.com/).
You can generate the metrics export endpoint by going to your project settings (last tab up top) and clicking "Create API Keys". You will then see the link to the prometheus endpoint, which looks like this:
```
https://healthchecks.io/projects/45sd78-eeee-dddd-8888-b25a9887ecfd/metrics/NXyGzks4s8xcF1J-wzoaioyoqXIANGD0
```
## Update the prometheus.yml
You can take that link and add it to the prometheus config:
```yaml
- job_name: "healthchecks"
scrape_interval: 60s
scheme: https
metrics_path: /projects/45sd78-eeee-dddd-8888-b25a9887ecfd/metrics/NXyGzks4s8xcF1J-wzoaioyoqXIANGD0
static_configs:
- targets: ["healthchecks.io"]
```
Notice how we split up the URL and paste in the scheme, domain, and path separately.
Reload promethus and your changes should be live, coming in under the `hc_` prefix.

+ 2
- 1
templates/front/base_docs.html View File

@ -32,6 +32,7 @@
{% include "front/docs_nav_item.html" with slug="measuring_script_run_time" title="Measuring script run time" %} {% include "front/docs_nav_item.html" with slug="measuring_script_run_time" title="Measuring script run time" %}
{% include "front/docs_nav_item.html" with slug="attaching_logs" title="Attaching logs" %} {% include "front/docs_nav_item.html" with slug="attaching_logs" title="Attaching logs" %}
{% include "front/docs_nav_item.html" with slug="cloning_checks" title="Cloning Checks" %} {% include "front/docs_nav_item.html" with slug="cloning_checks" title="Cloning Checks" %}
{% include "front/docs_nav_item.html" with slug="configuring_prometheus" title="Configuring Prometheus" %}
<li class="nav-header">Developer Tools</li> <li class="nav-header">Developer Tools</li>
{% include "front/docs_nav_item.html" with slug="api" title="Management API" %} {% include "front/docs_nav_item.html" with slug="api" title="Management API" %}
@ -47,4 +48,4 @@
{% endblock %} {% endblock %}
</div> </div>
</div> </div>
{% endblock %}
{% endblock %}

Loading…
Cancel
Save