pcp2graphite man page

pcp2graphite — pcp-to-graphite metrics exporter

Synopsis

pcp2graphite [-h hostspec] [-a archive] [-L] [-O origin] [-T finish] [-s samples] [-t delta] [-g graphitehost] [-p pickleport] [-P textport] [-r pickleprotocol] [-u units] [-m prefix] metricname ...

Description

pcp2graphite is a PCP metric exporter. It relays hierarchies of the pmns(5) to a designated Graphite (Carbon/Whisper) database by periodically polling, then copying/converting relevant numerical metrics across the Graphite "text" or "pickled" TCP protocols.  Metric values are optionally scaled to a given unit/scale, but are not rate-converted.  Metric names may be prefixed and are somewhat canonicalized to fit the Graphite namespace rules.

The data transfer will continue on a best-effort basis until the program is interrupted.  Temporary errors are ignored.  Multiple copies of this program may be run in parallel, to populate different Graphite databases or subtrees, with different scaling or sampling intervals.

The pmmgr(1) daemon can be used to ensure one or more pcp2grapite instances start at system boot time.

Options

-h hostspec

Extract metrics from the specified pmcd(1) daemon, using a host specification as described on PCPIntro(1). The default is local:.

-a archive

Extract metrics from the given set of archives, which is a comma-separated list of names, each of which may be the base name of an archive or the name of a directory containing one or more archives.

-L

Extract metrics from the local context PCP PMDAs.

-t delta

Specify the polling interval in seconds.  If live, polling is aligned to natural multiples of this interval.  The default is 60 seconds.

-O origin

Set the time origin for archive scanning.  The default is the start of the set of archives.

-T finish

Set the time finish for archive scanning.  The default is the end of the set of archives.

-s samples

Set the maximum number of samples to relay.  The default is unlimited.

-g graphitehost

Specify the graphite carbon-cache server where the relayed data is to be relayed.  The default is localhost.

-p pickleport

Select the more efficient "pickled" encoding for carbon-cache communication, and use the given TCP port.  This is the default, using port 2004.

-P textport

Alternately, select the less efficient "text" encoding for carbon-cache communication, and use the given TCP port.  This protocol is not default, because it requires a separate TCP connection for each metric.  The typical port is 2003.

-r pickleprotocol

Select the protocol for the "pickled" encoding. The possible values are:

  • 0 - ASCII protocol (the slowest),
  • 1 - old binary protocol - pre Python 2.3,
  • 2 - new binary protocol introduced in Python 2.3.

The default is 0.

-u units

Rescale the metrics to the given UNITS string, as parsed by the pmParseUnitsStr(3) function.  This must be dimensionally consistent with the underlying PCP metric.  The default is to perform no scaling.

-m prefix

Use the given string as a prefix for all PMNS metrics relayed to Graphite. The default is pcp. (note the period at the end).

metricname

Relay all numeric metrics nested at or below the given name in the PMNS. This option may be repeated.  This is a compulsory option, having no default.

See Also

PCPIntro(1), pmcd(1), pmParseUnitsStr(3), http://graphite.wikidot.com/, pmmgr(1), pmval(1), PMAPI(3), pcp.conf(5) and pmns(5).

Referenced By

pcp2elasticsearch(1), pcp2json(1), pcp2xml(1), pcp2zabbix(1), pmmgr(1), pmrep(1).

PCP Performance Co-Pilot