You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by "purushah (via GitHub)" <gi...@apache.org> on 2024/09/23 19:08:04 UTC
[PR] ZOOKEEPER-4862 Doc for Secure prometheus support [zookeeper]
purushah opened a new pull request, #2190:
URL: https://github.com/apache/zookeeper/pull/2190
(no comment)
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "kezhuw (via GitHub)" <gi...@apache.org>.
kezhuw merged PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "purushah (via GitHub)" <gi...@apache.org>.
purushah commented on code in PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#discussion_r1777968778
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,49 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```conf
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```conf
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
+
+#### Enabling HTTPS for Prometheus Metrics:
+
+ZooKeeper also supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
+
+- Define the HTTPS port:
+ ```conf
+ metricsProvider.httpPorts=4443
+ ```
+
+- Configure the SSL key store (holds the server’s private key and certificates):
+ ```conf
+ metricsProvider.ssl.keyStore.location=/path/to/keystore.jks
+ metricsProvider.ssl.keyStore.password=your_keystore_password
+ metricsProvider.ssl.keyStore.type=jks # Default is JKS
+ ```
+
+- Configure the SSL trust store (used to verify client certificates):
+ ```conf
+ metricsProvider.ssl.trustStore.location=/path/to/truststore.jks
+ metricsProvider.ssl.trustStore.password=your_truststore_password
+ metricsProvider.ssl.trustStore.type=jks # Default is JKS
+ ```
+
+- **Note**: You can enable both HTTP and HTTPS simultaneously by defining both ports:
+ ```conf
+ metricsProvider.httpPorts=7000
+ metricsProvider.httpsPorts=4443
Review Comment:
Thanks for catching that, @kezhuw. That was a simple oversight on my part.
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#discussion_r1774307400
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,48 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```bash
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```bash
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
+
+#### Enabling HTTPS for Prometheus Metrics:
+ZooKeeper also supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
+
+- Define the HTTPS port:
+ ```bash
+ metricsProvider.httpPorts=4443
+ ```
+
+- Configure the SSL key store (holds the server’s private key and certificates):
+ ```bash
+ metricsProvider.ssl.keyStore.location=/path/to/keystore.jks
+ metricsProvider.ssl.keyStore.password=your_keystore_password
+ metricsProvider.ssl.keyStore.type=jks # Default is JKS
+ ```
+
+- Configure the SSL trust store (used to verify client certificates):
+ ```bash
+ metricsProvider.ssl.trustStore.location=/path/to/truststore.jks
+ metricsProvider.ssl.trustStore.password=your_truststore_password
+ metricsProvider.ssl.trustStore.type=jks # Default is JKS
+ ```
+
+- **Note**: You can enable both HTTP and HTTPS simultaneously by defining both ports:
+ ```bash
+ metricsProvider.httpPorts=7000
+ metricsProvider.httpsPorts=4443
+ ```
Review Comment:
````suggestion
- You can enable HTTP and HTTPS simultaneously by defining both ports:
```conf
metricsProvider.httpPorts=7000
metricsProvider.httpsPorts=4443
```
````
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "kezhuw (via GitHub)" <gi...@apache.org>.
kezhuw commented on PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#issuecomment-2381063130
Merged. @purushah Thank you for your contribution!
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "purushah (via GitHub)" <gi...@apache.org>.
purushah commented on PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#issuecomment-2375239078
@tisonkun, I have addressed your comments.
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "purushah (via GitHub)" <gi...@apache.org>.
purushah commented on code in PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#discussion_r1777969311
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,49 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```conf
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```conf
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
+
+#### Enabling HTTPS for Prometheus Metrics:
+
+ZooKeeper also supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
+
+- Define the HTTPS port:
+ ```conf
+ metricsProvider.httpPorts=4443
+ ```
+
+- Configure the SSL key store (holds the server’s private key and certificates):
+ ```conf
+ metricsProvider.ssl.keyStore.location=/path/to/keystore.jks
+ metricsProvider.ssl.keyStore.password=your_keystore_password
+ metricsProvider.ssl.keyStore.type=jks # Default is JKS
Review Comment:
Yes, if needed, we can do it.
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#discussion_r1774306595
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,48 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```bash
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
Review Comment:
````suggestion
### Pre-requisites:
- Enable the Prometheus MetricsProvider by setting the following in `zoo.cfg`:
```conf
metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
```
````
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "kezhuw (via GitHub)" <gi...@apache.org>.
kezhuw commented on code in PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#discussion_r1777909664
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,49 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```conf
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```conf
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
+
+#### Enabling HTTPS for Prometheus Metrics:
+
+ZooKeeper also supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
+
+- Define the HTTPS port:
+ ```conf
+ metricsProvider.httpPorts=4443
+ ```
+
+- Configure the SSL key store (holds the server’s private key and certificates):
+ ```conf
+ metricsProvider.ssl.keyStore.location=/path/to/keystore.jks
+ metricsProvider.ssl.keyStore.password=your_keystore_password
+ metricsProvider.ssl.keyStore.type=jks # Default is JKS
+ ```
+
+- Configure the SSL trust store (used to verify client certificates):
+ ```conf
+ metricsProvider.ssl.trustStore.location=/path/to/truststore.jks
+ metricsProvider.ssl.trustStore.password=your_truststore_password
+ metricsProvider.ssl.trustStore.type=jks # Default is JKS
+ ```
+
+- **Note**: You can enable both HTTP and HTTPS simultaneously by defining both ports:
+ ```conf
+ metricsProvider.httpPorts=7000
+ metricsProvider.httpsPorts=4443
Review Comment:
```suggestion
metricsProvider.httpPort=7000
metricsProvider.httpsPort=4443
```
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,49 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```conf
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```conf
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
+
+#### Enabling HTTPS for Prometheus Metrics:
+
+ZooKeeper also supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
+
+- Define the HTTPS port:
+ ```conf
+ metricsProvider.httpPorts=4443
Review Comment:
```suggestion
metricsProvider.httpsPort=4443
```
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,49 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```conf
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```conf
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
+
+#### Enabling HTTPS for Prometheus Metrics:
+
+ZooKeeper also supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
+
+- Define the HTTPS port:
+ ```conf
+ metricsProvider.httpPorts=4443
+ ```
+
+- Configure the SSL key store (holds the server’s private key and certificates):
+ ```conf
+ metricsProvider.ssl.keyStore.location=/path/to/keystore.jks
+ metricsProvider.ssl.keyStore.password=your_keystore_password
+ metricsProvider.ssl.keyStore.type=jks # Default is JKS
Review Comment:
backlog: I think we cloud detect this by filename just as `zookeeper.ssl.keyStore.type`.
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#discussion_r1774307717
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,48 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```bash
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```bash
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
+
+#### Enabling HTTPS for Prometheus Metrics:
+ZooKeeper also supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
Review Comment:
```suggestion
#### Enabling HTTPS for Prometheus Metrics:
ZooKeeper supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
```
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#discussion_r1774307513
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,48 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```bash
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```bash
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
+
+#### Enabling HTTPS for Prometheus Metrics:
+ZooKeeper also supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
+
+- Define the HTTPS port:
+ ```bash
Review Comment:
````suggestion
```conf
````
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#discussion_r1774307857
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,48 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```bash
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```bash
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
+
+#### Enabling HTTPS for Prometheus Metrics:
+ZooKeeper also supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
+
+- Define the HTTPS port:
+ ```bash
+ metricsProvider.httpPorts=4443
+ ```
+
+- Configure the SSL key store (holds the server’s private key and certificates):
+ ```bash
Review Comment:
```suggestion
```conf
```
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#discussion_r1774306903
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,48 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```bash
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```bash
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
Review Comment:
````suggestion
- The port for Prometheus metrics can be configured using (default to 7000):
```conf
metricsProvider.httpPort=7000
```
````
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ZOOKEEPER-4862. Add doc to secure prometheus support [zookeeper]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #2190:
URL: https://github.com/apache/zookeeper/pull/2190#discussion_r1774308075
##########
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md:
##########
@@ -41,11 +41,48 @@ All the metrics are included in the `ServerMetrics.java`.
<a name="Prometheus"></a>
+
+### Pre-requisites:
+- Enable the `Prometheus MetricsProvider` by setting the following in `zoo.cfg`:
+ ```bash
+ metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
+ ```
+
+- The port for Prometheus metrics can be configured using:
+ ```bash
+ metricsProvider.httpPort=7000 # Default port is 7000
+ ```
+
+#### Enabling HTTPS for Prometheus Metrics:
+ZooKeeper also supports SSL for Prometheus metrics, which provides secure data transmission. To enable this, configure an HTTPS port and set up SSL certificates as follows:
+
+- Define the HTTPS port:
+ ```bash
+ metricsProvider.httpPorts=4443
+ ```
+
+- Configure the SSL key store (holds the server’s private key and certificates):
+ ```bash
+ metricsProvider.ssl.keyStore.location=/path/to/keystore.jks
+ metricsProvider.ssl.keyStore.password=your_keystore_password
+ metricsProvider.ssl.keyStore.type=jks # Default is JKS
+ ```
+
+- Configure the SSL trust store (used to verify client certificates):
+ ```bash
Review Comment:
```suggestion
```conf
```
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org