Keycloak

Форк
0
/
configuration-metrics.adoc 
80 строк · 2.9 Кб
1
<#import "/templates/guide.adoc" as tmpl>
2
<#import "/templates/kc.adoc" as kc>
3
<#import "/templates/options.adoc" as opts>
4
<#import "/templates/links.adoc" as links>
5

6
<@tmpl.guide
7
title="Enabling {project_name} Metrics"
8
summary="Learn how to enable and expose metrics from the server"
9
includedOptions="metrics-enabled">
10

11
{project_name} has built in support for metrics. This {section} describes how to enable and configure server metrics.
12

13
== Enabling Metrics
14

15
It is possible to enable metrics using the build time option `metrics-enabled`:
16

17
<@kc.start parameters="--metrics-enabled=true"/>
18

19
== Querying Metrics
20

21
{project_name} exposes metrics at the following endpoint:
22

23
* `/metrics`
24

25
The response from the endpoint uses a `text/plain` content type and it is based on the Prometheus text format. The snippet bellow
26
is an example of a response:
27

28
[source]
29
----
30
# HELP base_gc_total Displays the total number of collections that have occurred. This attribute lists -1 if the collection count is undefined for this collector.
31
# TYPE base_gc_total counter
32
base_gc_total{name="G1 Young Generation",} 14.0
33
# HELP jvm_memory_usage_after_gc_percent The percentage of long-lived heap pool used after the last GC event, in the range [0..1]
34
# TYPE jvm_memory_usage_after_gc_percent gauge
35
jvm_memory_usage_after_gc_percent{area="heap",pool="long-lived",} 0.0
36
# HELP jvm_threads_peak_threads The peak live thread count since the Java virtual machine started or peak was reset
37
# TYPE jvm_threads_peak_threads gauge
38
jvm_threads_peak_threads 113.0
39
# HELP agroal_active_count Number of active connections. These connections are in use and not available to be acquired.
40
# TYPE agroal_active_count gauge
41
agroal_active_count{datasource="default",} 0.0
42
# HELP base_memory_maxHeap_bytes Displays the maximum amount of memory, in bytes, that can be used for memory management.
43
# TYPE base_memory_maxHeap_bytes gauge
44
base_memory_maxHeap_bytes 1.6781410304E10
45
# HELP process_start_time_seconds Start time of the process since unix epoch.
46
# TYPE process_start_time_seconds gauge
47
process_start_time_seconds 1.675188449054E9
48
# HELP system_load_average_1m The sum of the number of runnable entities queued to available processors and the number of runnable entities running on the available processors averaged over a period of time
49
# TYPE system_load_average_1m gauge
50
system_load_average_1m 4.005859375
51

52
...
53
----
54

55
== Available Metrics
56

57
The table below summarizes the available metrics groups:
58

59
[%autowidth]
60
|===
61
|Metric | Description
62

63
|System
64
|A set of system-level metrics related to CPU and memory usage.
65

66
|JVM
67
|A set of metrics from the Java Virtual Machine (JVM) related to GC, and heap.
68

69
|Database
70
|A set of metrics from the database connection pool, if using a database.
71

72
|HTTP
73
|A set of global and individual metrics from the HTTP endpoints
74

75
|Cache
76
|A set of metrics from Infinispan caches. See <@links.server id="caching"/> for more details.
77

78
|===
79

80
</@tmpl.guide>
81

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.