Managing exporters using API

Configure and manage OpenTelemetry Collector Gateway exporters and metrics services using the web configuration options.

  1. Log in to Cloudera Manager
  2. Navigate to Hosts > Hosts Configuration tab
  3. In the search bar, search for OpenTelemetry Collector Gateway Exporter for metrics (otelcol_gateway_external_metrics_exporter)
  4. Append the configuration block in YAML format for your new exporter

    Exporter YAML example:

    prometheusremotewrite/my-exporter:
      endpoint: "https://receive.example.com/api/v1/receive"
      retry_on_failure:
        enabled: true
        initial_interval: 10s
        max_interval: 40s
        max_elapsed_time: 300s
      auth:
        authenticator: cdpauth/gateway
    otlp/secure:
      endpoint: "api.your-observability-backend.com:4317"
      headers:
        "api-key": "your-secret-api-key"
      tls:
        insecure: false
  5. Click Save Changes
  6. In the search bar, search for the OpenTelemetry Collector Gateway Metrics Service (otelcol_gateway_metrics_service)
  7. Edit the list of exporters in the exporters section to include the name of the new exporter

    Updated metrics service YAML example:

     metrics/gateway-<rr_connector_count>:
          receivers: [roundrobin/gateway-lb]
          exporters: [prometheusremotewrite/gateway-<rr_connector_count>]
        metrics/routing:
          receivers: [roundrobin]
          exporters: [routing/metrics-fanout]
        metrics/gateway-lb:
          receivers: [routing/metrics-fanout]
          exporters: [roundrobin/gateway-lb]
        metrics/prometheusremotewrite-priv:
          receivers: [routing/metrics-fanout]
          processors: [attributes/test_marker]
          exporters: [prometheusremotewrite/priv]
  8. Click Save Changes
  9. In the search bar, search for the OpenTelemetry Collector Connectors (otelcol_connectors)
  10. Append the list of pipelines for the exporter you configured

    Connector YAML example:

    connectors:
      roundrobin:
      loadbalancing:
      roundrobin/gateway-lb:
      routing/metrics-fanout:
        error_mode: ignore
        table:
          - condition: "true"
            pipelines:
              - metrics/gateway-lb
              - metrics/prometheusremotewrite-priv
  11. Click Save Changes