1PCP2GRAPHITE(1) General Commands Manual PCP2GRAPHITE(1)
2
3
4
6 pcp2graphite - pcp-to-graphite metrics exporter
7
9 pcp2graphite [-h hostspec] [-a archive] [-L] [-O origin] [-T finish]
10 [-s samples] [-t delta] [-g graphitehost] [-p pickleport] [-P textport]
11 [-u units] [-m prefix] metricname ...
12
14 pcp2graphite is a PCP metric exporter. It relays hierarchies of the
15 pmns(5) to a designated Graphite (Carbon/Whisper) database by periodi‐
16 cally polling, then copying/converting relevant numerical metrics
17 across the Graphite "text" or "pickled" TCP protocols. Metric values
18 are optionally scaled to a given unit/scale, but are not rate-con‐
19 verted. Metric names may be prefixed and are somewhat canonicalized to
20 fit the Graphite namespace rules.
21
22 The data transfer will continue on a best-effort basis until the pro‐
23 gram is interrupted. Temporary errors are ignored. Multiple copies of
24 this program may be run in parallel, to populate different Graphite
25 databases or subtrees, with different scaling or sampling intervals.
26
28 -h hostspec
29 Extract metrics from the specified pmcd(1) daemon, using a host
30 specification as described on PCPIntro(1). The default is
31 local:.
32
33 -a archive
34 Extract metrics from given archive.
35
36 -L Extract metrics from the local context PCP PMDAs.
37
38 -t delta
39 Specify the polling interval in seconds. If live, polling is
40 aligned to natural multiples of this interval. The default is
41 60 seconds.
42
43 -O origin
44 Set the time origin for archive scanning. The default is the
45 start of the archive.
46
47 -T finish
48 Set the time finish for archive scanning. The default is the
49 end of the archive.
50
51 -s samples
52 Set the maximum number of samples to relay. The default is
53 unlimited.
54
55 -g graphitehost
56 Specify the graphite carbon-cache server where the relayed data
57 is to be relayed. The default is localhost.
58
59 -p pickleport
60 Select the more efficient "pickled" encoding for carbon-cache
61 communication, and use the given TCP port. This is the default,
62 using port 2004.
63
64 -P textport
65 Alternately, select the less efficient "text" encoding for car‐
66 bon-cache communication, and use the given TCP port. This pro‐
67 tocol is not default, because it requires a separate TCP connec‐
68 tion for each metric. The typical port is 2003.
69
70 -u units
71 Rescale the metrics to the given UNITS string, as parsed by the
72 pmParseUnitsStr(3) function. This must be dimensionally consis‐
73 tent with the underlying PCP metric. The default is to perform
74 no scaling.
75
76 -m prefix
77 Use the given string as a prefix for all PMNS metrics relayed to
78 Graphite. The default is pcp. (note the period at the end).
79
80 metricname
81 Relay all numeric metrics nested at or below the given name in
82 the PMNS. This option may be repeated. This is a compulsory
83 option, having no default.
84
86 An example of a Linux systemd(1) service file that can be used to have
87 systemd managing a single instance of pcp2graphite follows:
88
89 [Unit]
90 Description=Performance Co-Pilot data pump to Graphite
91 Documentation=man:pcp2graphite(1)
92 After=pmcd.service
93
94 [Service]
95 ExecStart=/usr/bin/pcp2graphite <OPTIONS>
96
97 [Install]
98 WantedBy=multi-user.target
99
101 PCPIntro(1), pmcd(1), systemd(1), pmParseUnitsStr(3),
102 http://graphite.wikidot.com/, pmval(1), PMAPI(3), pcp.conf(5) and
103 pmns(5).
104
105
106
107Performance Co-Pilot PCP PCP2GRAPHITE(1)