pcp2graphite - Online in the Cloud

This is the command pcp2graphite that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


pcp2graphite - pcp-to-graphite data pump

SYNOPSIS


pcp2graphite [-h HOST] [-a ARCHIVE] [-L] [-O TIMEORIGIN] [-T TIMEFINISH] [-s SAMPLES] [-t
DELTA] [-g GRAPHITEHOST] [-p PICKLEPORT] [-P TEXTPORT] [-u UNITS] [-m PREFIX] metricname
...

DESCRIPTION


The program pcp2graphite is PCP monitor / data exporter program based on the Python PMAPI
bindings. It relays whole hierarchies of the PMNS 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. One-shot
conversion runs such as from archives are not currently supported.

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.

Example of a systemd service file that can be used to have systemd managing a single
instance of pcp2graphite:

[Unit]
Description=Performance Co-Pilot data pump to Graphite
Documentation=man:pcp2graphite(8)
After=pmcd.service

[Service]
ExecStart=/opt/pcp/pcp2graphite.py <OPTIONS>

[Install]
WantedBy=multi-user.target

OPTIONS


-h HOST
Extract metrics from given PMCD server. Default local:.

-a ARCHIVE
Extract metrics from given archive.

-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. Default 60

-O TIMEORIGIN
Set the time origin for archive scanning. The default is the start of the archive.

-T TIMEFINISH
Set the time finish for archive scanning. The default is the end of the archive.

-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.
Default localhost.

-p PICKLEPORT
Select the more efficient "pickled" encoding for carbon-cache communication, and
use the given TCP port. This is 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.

-u UNITS
Rescale the metrics to the given UNITS string, as parsed by the pmParseUnitsStr
function. This must be dimensionally consistent with the underlying PCP metric.
Default is no scaling.

-m PREFIX
Use the given string as a prefix for all PMNS metrics relayed to Graphite. 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.

Use pcp2graphite online using onworks.net services



Latest Linux & Windows online programs