Telemetry Exporter: Prometheus

Telemetry: PrometheusEnterprise Edition+

Environment Variables

TELEMETRY_METRIC_READER

Telemetry metric exporter type.

TELEMETRY_METRIC_READER=prometheus

TELEMETRY_PROMETHEUS_SERVER

Whether to start a standalone server.

  • off: The scrape endpoint is /api/prometheus:metrics.
  • on: The scrape endpoint is host:port:metrics.
TELEMETRY_PROMETHEUS_SERVER=off

TELEMETRY_PROMETHEUS_PORT

Port for the standalone server, default is 9464.

TELEMETRY_PROMETHEUS_PORT=9464

Prometheus Configuration

Using the NocoBase internal API:

scrape_configs:
  - job_name: 'nocobase'
    metrics_path: '/api/prometheus:metrics'
    static_configs:
      - targets: ['localhost:13001']

Using the standalone server:

scrape_configs:
  - job_name: 'nocobase'
    static_configs:
      - targets: ['localhost:9464']