Skip to content

Commit 4c4aa08

Browse files
authored
fix: add metrics token support (#515)
Co-authored-by: Stetson Robinson <[email protected]>
1 parent fbc2bfb commit 4c4aa08

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/kafka/metrics-monitoring-kafka/README.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,16 @@ This procedure follows the https://prometheus.io/docs/prometheus/latest/configur
162162

163163
.Prerequisites
164164
* You have access to a Kafka instance that contains topics in {product-kafka}. For more information about access management in {product-kafka}, see {base-url}{access-mgmt-url-kafka}[_Managing account access in {product-long-kafka}_^].
165+
* You have the ID and the SASL/OAUTHBEARER token endpoint for the Kafka instance. To relocate the Kafka instance ID and the token endpoint, select your Kafka instance in the {product-kafka} web console, select the options menu (three vertical dots), and click *Connection*.
165166
* You have the generated credentials for your service account that has access to the Kafka instance. To regenerate and re-copy the credentials, use the *Service Accounts* page in the {product-kafka} web console to find your service account and update the credentials. For more information about service accounts, see {base-url}{getting-started-url-kafka}#proc-creating-service-account_getting-started[_Getting started with {product-long-kafka}_^].
166167
* You've installed a Prometheus instance in your monitoring environment. For installation instructions, see https://prometheus.io/docs/prometheus/latest/getting_started/[Getting Started] in the Prometheus documentation.
167168

168169
.Procedure
169-
. In your Prometheus configuration file, add the following information. Replace `<kafka_instance_id>` with the ID of the Kafka instance. Replace `<client_id>` and `<client_secret>` with the generated credentials for your service account.
170+
. In your Prometheus configuration file, add the following information. Replace the variable values with your own Kafka instance and service account information.
170171
+
171172
--
173+
The `<kafka_instance_id>` is the ID of the Kafka instance. The `<client_id>` and `<client_secret>` are the generated credentials for your service account that you copied previously. The `<token_url>` is the SASL/OAUTHBEARER token endpoint for the Kafka instance.
174+
172175
.Required information for Prometheus configuration file
173176
[source,yaml,subs="+quotes"]
174177
----
@@ -180,7 +183,7 @@ This procedure follows the https://prometheus.io/docs/prometheus/latest/configur
180183
oauth2:
181184
client_id: "__<client_id>__"
182185
client_secret: "__<client_secret>__"
183-
token_url: "https://identity.api.openshift.com/auth/realms/rhoas/protocol/openid-connect/token"
186+
token_url: "__<token_url>__"
184187
----
185188

186189
The new scrape target becomes available after the configuration has reloaded.
@@ -210,7 +213,7 @@ If you use the Prometheus Operator in your monitoring environment, you can alter
210213
oauth2:
211214
client_id: "__<client_id>__"
212215
client_secret: "__<client_secret>__"
213-
token_url: "https://identity.api.openshift.com/auth/realms/rhoas/protocol/openid-connect/token"
216+
token_url: "__<token_url>__"
214217
----
215218
216219
.Example command to create and apply a Kubernetes secret

0 commit comments

Comments
 (0)