Skip to content

Commit

Permalink
feat(metrics): Add documentation for Prometheus support
Browse files Browse the repository at this point in the history
  • Loading branch information
brasseld committed Jun 29, 2018
1 parent 76fc933 commit 3b9c7b3
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _data/sidebars/apim_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ entries:
- title: Configure Keycloak
output: web
url: /apim_installguide_authentication_keycloak.html
- title: Metrics
output: web
subfolderitems:
- title: Prometheus
output: web
url: /apim_installguide_metrics_prometheus.html

- title: Docker
output: web
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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]

0 comments on commit 3b9c7b3

Please sign in to comment.