PMDAPROMETHEUS(1)

NAME
pmdaprometheus - Prometheus PMDA

DESCRIPTION
pmdaprometheus is a Performance Metrics Domain Agent (PMDA) which creates PCP metrics from Prometheus endpoints, which provide HTTP based access to application metrics.

Further details on the Prometheus exposition format can be found at https://prometheus.io/docs/instrumenting/exposition_formats

METADATA SOURCES
pmdaprometheus scans the $PCP_PMDAS_DIR/prometheus/metadata directory, looking for metadata files (*.json). These JSON metadata files describe the names, types, etc. of their associated Prometheus metrics for a given endpoint. For example, let's assume the following simple Prometheus metric:

# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 86

The associated metadata file would look like the following:

{
  "metrics": [
    {
      "semantics": "instantaneous",
      "type": "uint64",
      "units_str": "",
      "prometheus_name": "go_goroutines",
      "name": "go_goroutines",
      "description": "Number of goroutines that currently exist."
    }
  ]
}

Allowable values for each of the metadata fields are:

semantics=[counter, instantaneous]
    the semantics of the metric

type=[double, uint64]
    the base data type of the metric

name=STRING
    name of the metric to be used in PCP

units_str=STRING
    the dimension and units of the metric which can be parsed by pmParseUnitsStr(3)

prometheus_name=STRING
    complete metric name as used in Prometheus

description=STRING
    text description of the metric

METADATA GENERATOR
The pmdaprometheus metadata generation helper script helps in providing initial content for the (heuristic-based) metric metadata, from a Prometheus endpoint.

$PCP_PMDAS_DIR/prometheus/Generate [OPTIONS]

Mandatory arguments to long options are mandatory for short options too. Following are the mandatory options:

-u, --url=STRING
    URL of the Prometheus endpoint

-n, --name=STRING
    name of the Prometheus endpoint

INSTALLATION
Install the Prometheus PMDA by using the Install script as root:

      # cd $PCP_PMDAS_DIR/prometheus
      # ./Install

To uninstall, do the following as root:

      # cd $PCP_PMDAS_DIR/prometheus
      # ./Remove

pmdaprometheus is launched by pmcd(1) and should never be executed directly. The Install and Remove scripts notify pmcd(1) when the agent is installed or removed.

FILES

$PCP_PMDAS_DIR/prometheus/Install
    installation script for the pmdaprometheus agent

$PCP_PMDAS_DIR/prometheus/Remove
    undo installation script for the pmdaprometheus agent

$PCP_PMDAS_DIR/prometheus/Generate
    generate metadata describing available metrics based on heuristics

$PCP_PMDAS_DIR/prometheus/metadata/
    metadata files for the pmdaprometheus agent

$PCP_LOG_DIR/pmcd/prometheus.log
    default log file for error messages from pmdaprometheus

PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5).

SEE ALSO
pmcd(1), pminfo(1), pmprobe(1) and https://prometheus.io/docs/instrumenting/exposition_formats.