此内容没有您所选择的语言版本。
Chapter 4. Introducing metrics
If you want to introduce metrics to your Streams for Apache Kafka Proxy deployment, you can configure an insecure HTTP and Prometheus endpoint (at /metrics).
Add the following to the ConfigMap resource that defines the Streams for Apache Kafka Proxy configuration:
Minimal metrics configuration
adminHttp:
endpoints:
prometheus: {}
adminHttp:
endpoints:
prometheus: {}
By default, the HTTP endpoint listens on 0.0.0.0:9190. You can change the hostname and port as follows:
Example metrics configuration with hostname and port
adminHttp:
host: localhost
port: 9999
endpoints:
prometheus: {}
adminHttp:
host: localhost
port: 9999
endpoints:
prometheus: {}
The example files provided with the proxy include a PodMonitor resource. If you have enabled monitoring in OpenShift for user-defined projects, you can use a PodMonitor resource to ingest the proxy metrics.
Example PodMonitor resource configuration