affo commented on code in PR #2711:
URL: https://github.com/apache/fluss/pull/2711#discussion_r2905633888
##########
website/docs/install-deploy/deploying-with-helm.md:
##########
@@ -255,6 +267,63 @@ listeners:
port: 9124
```
+### Metrics and Monitoring
+
+When `metrics.enabled` is `true`, adds the following `server.yaml` config
entries:
+
+- `metrics.reporters`: comma-separated reporter names from `metrics.reporters`
+- `metrics.reporter.<name>.<option>`: one entry per reporter option in
`metrics.reporters`
+
+If a metrics key is already provided in `configurationOverrides` (for example,
`metrics.reporters` or `metrics.reporter.prometheus.port`), the chart keeps the
value from `configurationOverrides`.
+
+#### Prometheus Annotation Based Scraping
+
+The example values below show how to add annotations to the metrics services
so that a Prometheus server can discovery and scrape them automatically based
on the annotations:
Review Comment:
```suggestion
The example values below show how to add annotations to the metrics services
so that a Prometheus server can discover and scrape them automatically based on
the annotations:
```
##########
website/docs/install-deploy/deploying-with-helm.md:
##########
@@ -255,6 +267,63 @@ listeners:
port: 9124
```
+### Metrics and Monitoring
+
+When `metrics.enabled` is `true`, adds the following `server.yaml` config
entries:
+
+- `metrics.reporters`: comma-separated reporter names from `metrics.reporters`
+- `metrics.reporter.<name>.<option>`: one entry per reporter option in
`metrics.reporters`
+
+If a metrics key is already provided in `configurationOverrides` (for example,
`metrics.reporters` or `metrics.reporter.prometheus.port`), the chart keeps the
value from `configurationOverrides`.
+
+#### Prometheus Annotation Based Scraping
+
+The example values below show how to add annotations to the metrics services
so that a Prometheus server can discovery and scrape them automatically based
on the annotations:
+
+```yaml
+metrics:
+ enabled: true
+ reporters:
+ prometheus:
+ port: 9249
+ service:
+ annotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/path: "/metrics"
+ prometheus.io/port: "9249"
+```
+
+#### Prometheus ServiceMonitor Based Scraping
+
+Similarly, if using the [Prometheus
Operator](https://prometheus-operator.dev/), use the values below to add labels
to the metrics services and then create a
[`ServiceMonitor`](https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.ServiceMonitor)
that selects them:
+
+```yaml
+metrics:
+ enabled: true
+ reporters:
+ prometheus:
+ port: 9249
+ service:
+ portName: metrics
+ labels:
+ monitoring: enabled
+```
+
+Then create a `ServiceMonitor` resource that matches the label:
Review Comment:
```suggestion
Then create a
[`ServiceMonitor`](https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.ServiceMonitor)
that selects them matching the labels:
```
##########
website/docs/install-deploy/deploying-with-helm.md:
##########
@@ -255,6 +267,63 @@ listeners:
port: 9124
```
+### Metrics and Monitoring
+
+When `metrics.enabled` is `true`, adds the following `server.yaml` config
entries:
+
+- `metrics.reporters`: comma-separated reporter names from `metrics.reporters`
+- `metrics.reporter.<name>.<option>`: one entry per reporter option in
`metrics.reporters`
+
+If a metrics key is already provided in `configurationOverrides` (for example,
`metrics.reporters` or `metrics.reporter.prometheus.port`), the chart keeps the
value from `configurationOverrides`.
+
+#### Prometheus Annotation Based Scraping
+
+The example values below show how to add annotations to the metrics services
so that a Prometheus server can discovery and scrape them automatically based
on the annotations:
+
+```yaml
+metrics:
+ enabled: true
+ reporters:
+ prometheus:
+ port: 9249
+ service:
+ annotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/path: "/metrics"
+ prometheus.io/port: "9249"
+```
+
+#### Prometheus ServiceMonitor Based Scraping
+
+Similarly, if using the [Prometheus
Operator](https://prometheus-operator.dev/), use the values below to add labels
to the metrics services and then create a
[`ServiceMonitor`](https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.ServiceMonitor)
that selects them:
Review Comment:
```suggestion
Similarly, if using the [Prometheus
Operator](https://prometheus-operator.dev/), use the values below to add labels
to the metrics services:
```
##########
helm/values.yaml:
##########
@@ -58,6 +58,16 @@ listeners:
client:
port: 9124
+metrics:
+ enabled: false
+ reporters:
Review Comment:
May be:
```yaml
metrics:
reporters: prometheus
prometheus: {}
jmx: {}
```
or:
```yaml
metrics:
reporters: prometheus,jmx
prometheus: {}
jmx: {}
```
The `reporters` key defines which reporter is enabled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]