For the complete documentation index, see llms.txt. This page is also available as Markdown.

Scraping Connectware Metrics with Self-Managed Prometheus

Verify that a Connectware metrics endpoint responds and configure a self-managed Prometheus instance to scrape it, without relying on the Prometheus Operator ServiceMonitor resource.

Configure a self-managed Prometheus instance to scrape Connectware metrics endpoints using static targets or Kubernetes Service Discovery, without relying on Prometheus Operator.

For Kubernetes deployments with Prometheus Operator, use ServiceMonitor resources through the Helm chart instead. See Configuring Prometheus Metrics.

Prerequisites

Metrics Endpoints

Each component with metrics.enabled set to true creates a dedicated Kubernetes Service for its metrics endpoint, separate from its main Service. The Service name always follows the pattern <app-name>-metrics, regardless of your installation name or namespace. All endpoints use HTTP and the path /metrics.

Component
App Name
Metrics Service
Port

Auth Server

auth-server

auth-server-metrics

9184

Broker

broker

broker-metrics

8888

NATS

nats

nats-metrics

7777

Protocol Mapper

protocol-mapper

protocol-mapper-metrics

9184

Resource Status Tracking

resource-status-tracking

resource-status-tracking-metrics

9184

Service Manager

service-manager

service-manager-metrics

9184

Scraping horizontally scaled Workloads

Verifying an Endpoint with curl

To confirm that a metrics endpoint responds before configuring Prometheus:

  1. Forward the component's metrics Service to your local machine. The following example targets Protocol Mapper:

Replace protocol-mapper-metrics and 9184 with the Service name and port for your component from Metrics Endpoints. Leave this command running in its own terminal.

  1. In a separate terminal, request the endpoint:

The endpoint returns metrics in the OpenMetrics text format, which Prometheus scrapes natively. The following shows a sample from Protocol Mapper:

Configuring Prometheus

Add a scrape job to your prometheus.yml file. Choose one of the following approaches.

Static Targets

Use a static target when you know the exact Service address you want to scrape. The following example targets Protocol Mapper:

Add one job per component, replacing the Service name and port from Metrics Endpoints. This approach requires updating prometheus.yml whenever you change a component's metrics configuration.

Kubernetes Service Discovery

Every metrics Service carries prometheus.io/scrape, prometheus.io/port, and prometheus.io/path annotations once metrics.enabled is true. If your Prometheus instance discovers targets through kubernetes_sd_configs, configure a scrape job that filters on these annotations:

This job automatically picks up every Connectware metrics Service in the cluster without requiring a ServiceMonitor.

For the full relabeling syntax, see the Prometheus documentation on kubernetes_sd_config.

Avoiding the Scrape Rate Limit

Auth Server, Protocol Mapper, Resource Status Tracking, and Service Manager limit how many scrape requests their metrics endpoint accepts within a time window. If you set a short scrape interval or scrape a component from multiple Prometheus jobs simultaneously, you may exceed rateLimit.count. Increase rateLimit.count or rateLimit.windowMs for the affected component, or reduce your scrape frequency. See Configuring Prometheus Metrics for the full Helm values reference.

Broker and NATS do not have a configurable rate limit.

Last updated

Was this helpful?