Skip to content

Prometheus Integration

Use this integration when your workloads already expose Prometheus metrics, and you want KloudMate to ingest them without changing application code.

KloudMate does not scrape Prometheus directly. Instead, you configure the KloudMate Agent with the Prometheus receiver and export the collected metrics to KloudMate.

  1. Install and run the KloudMate Agent.
  2. Ensure you can access the Prometheus configuration or know the scrape targets you want the Agent to use.
  1. Go to Settings → Agents.
  2. Find the agent you want to configure and select the three dots.
  3. Choose Configure.
  4. Go to Collector config.

Add the following configuration. You can copy scrape jobs from your existing Prometheus configuration or define a smaller metrics-only subset for KloudMate.

  • If the agent runs in managed mode, add it to the Custom config override section. See Custom config override.
  • If the agent runs in manual mode, add it directly to the collector configuration.
receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: kubernetes-pods
          kubernetes_sd_configs:
            - role: pod
          relabel_configs:
            - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
              regex: "true"
              action: keep
          metric_relabel_configs:
            - source_labels: [__name__]
              regex: "(request_duration_seconds.*|response_duration_seconds.*)"
              action: keep

service:
  pipelines:
    metrics/prometheus:
      receivers:
        - prometheus
      processors:
        - batch
      exporters:
        - otlphttp

The otlphttp exporter is already configured by default when you install the KloudMate Agent.

Validate indentation carefully when copying scrape_configs into the Agent configuration.

Click Save. The Agent restarts and applies the new configuration.

After the Agent restarts:

  • open Explore
  • query one of the scraped Prometheus metrics
  • build dashboards or alerts once the data is visible