Skip to main content

Simpleprometheus Receiver

Status Available in: contrib Maintainers: @fatsheep9146 Source: opentelemetry-collector-contrib

Supported Telemetry

Metrics

Overview

The prometheus_simple receiver is a wrapper around the prometheus receiver.

Configuration

The following settings are required:
  • endpoint (default = localhost:9090): The endpoint from which prometheus metrics should be scraped.
The following settings are optional:
  • collection_interval (default = 10s): The internal at which metrics should be emitted by this receiver.
  • job_name (default = prometheus_simple/${endpoint}): Prometheus scrape job name.
  • labels (default = {}): Static prometheus labels to assign to all metrics scraped from this endpoint.
  • metrics_path (default = /metrics): The path to the metrics endpoint.
  • params (default = {}): The query parameters to pass to the metrics endpoint. If specified, params are appended to metrics_path to form the URL with which the target is scraped.
  • use_service_account (default = false): Whether or not to use the Kubernetes Pod service account for authentication.
  • tls_enabled (default = false): Whether or not to use TLS. Only if tls_enabled is set to true, the values under tls_config are accounted for. This setting will be deprecated. Please use tls instead.
The tls_config section supports the following options. This setting will be deprecated. Please use tls instead:
  • ca_file (no default): Path to the CA cert that has signed the TLS certificate.
  • cert_file (no default): Path to the client TLS certificate to use for TLS required connections.
  • key_file (no default): Path to the client TLS key to use for TLS required connections.
  • insecure_skip_verify (default = false): Whether or not to skip certificate verification.
  • tls: see TLS Configuration Settings for the full set of available options.
Example:
    receivers:
      prometheus_simple:
        collection_interval: 10s
        use_service_account: true
        endpoint: "172.17.0.5:9153"
        tls:
          ca_file: "/path/to/ca"
          cert_file: "/path/to/cert"
          key_file: "/path/to/key"
          insecure_skip_verify: true
    exporters:
      signalfx:
        access_token: <SIGNALFX_ACCESS_TOKEN>
        url: <SIGNALFX_INGEST_URL>

    service:
      pipelines:
        metrics:
          receivers: [prometheus_simple]
          exporters: [signalfx]
The full list of settings exposed for this receiver are documented in config.go with detailed sample configurations in testdata/config.yaml.

Configuration

Example Configuration

prometheus_simple:
prometheus_simple/all_settings:
  endpoint: "localhost:1234"
  collection_interval: 30s
  metrics_path: /v2/metrics
  job_name: "job123"
  params:
    columns: "name,messages"
    key: [ "foo","bar" ]
  use_service_account: true
  tls:
    ca_file: "path"
    cert_file: "path"
    key_file: "path"
    insecure: false
    insecure_skip_verify: true
prometheus_simple/partial_settings:
  collection_interval: 30s
  endpoint: "localhost:1234"
  tls:
    insecure: true
prometheus_simple/partial_tls_settings:
  collection_interval: 30s
  endpoint: "localhost:1234"
  tls:
    insecure: false

Last generated: 2026-04-13