Configure Metrics Exposer
This page outlines the configuration values for the Metrics Exposer deployed via Axual Governance Helm chart.
About Metrics Exposer
Metrics Exposer is a runtime server system that allows the Self-Service to browse a target Kafka metrics. Metrics Exposer is based on Spring Boot 3.2.x
Metrics Exposer Prerequisite
Metrics Exposer, by default, is disabled in the Axual Governance since it requires a Prometheus stack to be running.
global:
  # Metrics Exposer is disabled by default
  metrics-exposer:
    enabled: trueIn addition,
- 
the Kafka metrics should be exposed to be captured by the Prometheus. 
- 
the API Gateway should redirect calls to the Metrics Exposer. 
- 
the Platform UI should allow the Insight features. 
Enable Kafka Metrics
This values.yaml enables the Kafka Metrics Exporter with the PodMonitor for Prometheus
kafka:
  kafka:
    # Enable PodMonitor
    metrics: true
    podMonitor:
      scrapeTimeout: "20s"
      interval: "30s"
    # Enable MetricsExporter
    kafkaExporter:
      enabled: trueEnable API Gateway redirect to Metrics Exposer
You can turn on the metricsExposer and metricsExposerApiDocs endpoints in the Gateway Configuration
api-gateway:
  config:
    gateway:
      endpoints:
        # Optional Backend service
        metricsExposer:
          enabled: true
          url: "http://[metrics-exposer-service-name]"
        # Optional Backend service
        metricsExposerApiDocs:
          enabled: true
          url: "http://[metrics-exposer-service-name]"Enable Self-Service Insight
You can turn on the insightsEnabled and provide the metricsExposerUrl endpoint in the Insight Configuration
platform-ui:
  config:
      # To enable Insights with Metrics Exposer
      insightsEnabled: true
      metricsExposerUrl: "https://platform.local/api/metrics"Metrics Exposer Configuration
Metrics Exposer requires very limited configuration to function, most of the Kafka configurations are sent at runtime.
For a complete list of configurations, please refer to Metrics Exposer Configuration.
Metrics Exposer Repository Configuration
Initially, you can override the registry, tag, and pullPolicy for the Metrics Exposer pod.
By default, these values come from the Axual Governance charts.
You can also override the imagePullSecrets; if not specify the Metrics Exposer pod will use the global.imagePullSecrets
metrics-exposer:
  image:
    registry: "docker.axual.io"
    pullPolicy: "Always"
    tag: "1.1.0"
  imagePullSecrets:
    - name: axualdockercredTLS Configuration
If needed, you can specify secrets containing the PEM certificates for keystore generation:
- 
Server keypair 
- 
Client keypair 
- 
Truststore 
Here is an example of how you can configure it.
metrics-exposer:
  tls:
    # -- Enables keystore generation
    enabled: true
    # -- Creates server keypair from PEM
    createServerKeypairSecret: true
    # -- PEM used to generate the server keypair if `createServerKeypairSecret` is true
    serverCertificatePem: <server-certificate>
    # -- PEM used to generate the server keypair if `createServerKeypairSecret` is true
    serverKeyPem: <server-key>
    # -- Creates client keypair from PEM
    createClientKeypairSecret: true
    # -- PEM used to generate the client keypair if `createClientKeypairSecret` is true
    clientCertificatePem: <client-certificate>
    # -- PEM used to generate the client keypair if `createClientKeypairSecret` is true
    clientKeyPem: <client-key>
    # -- Creates truststore from PEMs
    createTruststoreCaSecret: true
    # -- Set of PEMs used to generate the truststore if `createTruststoreCaSecret` is true
    caCerts:
      ca_one.crt:  <first-cert>
      ca_two.crt: <second-cert>For more information on the secrets defined above, refer to TLS secrets.
Application Configuration
Metrics Exposer is a Spring Boot application. Spring Boot applications can be configured with application.yml files.
What is present under config in the yml file, gets injected in a ConfigMap and mounted as an application.yml file.
metrics-exposer:
  config: {}Axual Configuration
Metrics Exposer requires to know where the Prometheus storing the Kafka Metrics is reachable.
For each {tenant} there could be a prometheus-url.
The default key it’s used as fallback, in case there is no tenant-specific prometheus-url
metrics-exposer:
  config:
      # Axual Configuration
      metrics-exposer:
        # Used to exposer Redoc API Documentation
        public-address: "http://platform.local"
        prometheus-urls:
          default: http://kube-prometheus-stack-prometheus:9090
          axual: http://axual-prometheus-stack-prometheus:9090