-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(metrics): Add documentation for Prometheus support
Closes gravitee-io/issues#1349
- Loading branch information
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+498 KB
images/installation/metrics/prometheus/metrics_prometheus_graph_memory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions
59
pages/apim/installation-guide/metrics/installation-guide-metrics-prometheus.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
sidebar: apim_sidebar | ||
permalink: apim_installguide_metrics_prometheus.html | ||
folder: apim/installation-guide/metrics | ||
description: Gravitee.io API Management - Metrics - Prometheus | ||
keywords: Gravitee.io, API Platform, API Management, API Gateway, metrics, prometheus, oauth2, openid, documentation, manual, guide, reference, api | ||
--- | ||
|
||
[[gravitee-installation-metrics-prometheus]] | ||
= Prometheus | ||
|
||
In this part we explain you how to configure Gravitee.io API Gateway to expose metrics to Prometheus. | ||
|
||
|
||
== API Gateway Configuration | ||
|
||
Configure the `gravitee.yml` file to enable metrics service. | ||
By default, Prometheus support is activated and exposed from the API Gateway technical API. | ||
|
||
[source,yaml] | ||
---- | ||
# metrics service | ||
metrics: | ||
enabled: true | ||
prometheus: | ||
enabled: true | ||
path: /metrics/prometheus | ||
---- | ||
|
||
== Prometheus Configuration | ||
|
||
Here is an example to ask Prometheus to scrape the API Gateway technical API where from formatted metrics are available. | ||
|
||
[source,yaml] | ||
---- | ||
scrape_configs: | ||
- job_name: 'gio-gw' | ||
basic_auth: | ||
username: admin | ||
password: adminadmin | ||
metrics_path: /_node/metrics/prometheus | ||
static_configs: | ||
- targets: ['localhost:18082'] | ||
---- | ||
|
||
== Prometheus UI | ||
|
||
Now we have everything correctly configured, we can have a look to Prometheus and explore metrics. | ||
By default, and when running Prometheus, the UI is exposed at http://localhost:9090/graph | ||
|
||
.Show `http_client_connections` metrics | ||
image::installation/metrics/prometheus/metrics_prometheus_graph.png[Show `http_client_connections` metrics, 873, 530, align=center, title-align=center] | ||
|
||
|
||
If you want to take a look to the memory consumed by the gateway: | ||
|
||
.Show `jvm_memory_used_bytes` metrics | ||
image::installation/metrics/prometheus/metrics_prometheus_graph_memory.png[Show `jvm_memory_used_bytes` metrics, 873, 530, align=center, title-align=center] | ||
|