From b1a64ea61ae2286a7346773f86dfe84434dc85fb Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Fri, 13 Dec 2024 11:42:36 -0800 Subject: [PATCH] HDDS-11929. [Website v2] [Docs] [Administrator Guide] Tracking Metrics With Prometheus. --- .../09-observability/04-prometheus.md | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/docs/05-administrator-guide/03-operations/09-observability/04-prometheus.md b/docs/05-administrator-guide/03-operations/09-observability/04-prometheus.md index bfc8cbcd73..43645b59a1 100644 --- a/docs/05-administrator-guide/03-operations/09-observability/04-prometheus.md +++ b/docs/05-administrator-guide/03-operations/09-observability/04-prometheus.md @@ -1,7 +1,48 @@ --- sidebar_label: Prometheus --- + # Tracking Metrics With Prometheus -**TODO:** File a subtask under [HDDS-9859](https://issues.apache.org/jira/browse/HDDS-9859) and complete this page or section. +Ozone has native support for Prometheus integration. All internal metrics (collected by Hadoop metrics framework) are published under the `/prom` HTTP endpoint. (For example under http://localhost:9876/prom for SCM). + +The Prometheus endpoint is turned on by default but can be turned off by the `hdds.prometheus.endpoint.enabled` configuration variable. + +In a secure environment the page is guarded with SPNEGO authentication which is not supported by Prometheus. To enable monitoring in a secure environment, a specific authentication token can be configured + +Example `ozone-site.xml`: + +```XML + + hdds.prometheus.endpoint.token + putyourtokenhere + +``` + +Example prometheus configuration: + +```YAML +scrape_configs: + - job_name: ozone + bearer_token: + metrics_path: /prom + static_configs: + - targets: + - "127.0.0.1:9876" +```