Skip to content

Commit c691a6d

Browse files
committed
HDDS-11929. [Website v2] [Docs] [Administrator Guide] Tracking Metrics With Prometheus.
1 parent 329c80a commit c691a6d

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed
Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,48 @@
11
---
22
sidebar_label: Prometheus
33
---
4+
<!---
5+
Licensed to the Apache Software Foundation (ASF) under one or more
6+
contributor license agreements. See the NOTICE file distributed with
7+
this work for additional information regarding copyright ownership.
8+
The ASF licenses this file to You under the Apache License, Version 2.0
9+
(the "License"); you may not use this file except in compliance with
10+
the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
-->
420

521
# Tracking Metrics With Prometheus
622

7-
**TODO:** File a subtask under [HDDS-9859](https://issues.apache.org/jira/browse/HDDS-9859) and complete this page or section.
23+
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).
24+
25+
The Prometheus endpoint is turned on by default but can be turned off by the `hdds.prometheus.endpoint.enabled` configuration variable.
26+
27+
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
28+
29+
Example `ozone-site.xml`:
30+
31+
```XML
32+
<property>
33+
<name>hdds.prometheus.endpoint.token</name>
34+
<value>putyourtokenhere</value>
35+
</property>
36+
```
37+
38+
Example prometheus configuration:
39+
40+
```YAML
41+
scrape_configs:
42+
- job_name: ozone
43+
bearer_token: <putyourtokenhere>
44+
metrics_path: /prom
45+
static_configs:
46+
- targets:
47+
- "127.0.0.1:9876"
48+
```

0 commit comments

Comments
 (0)