PCP2GRAPHITE(1)
๐ NAME ๐
pcp2graphite โ the pcp-to-graphite metrics exporter, bestie. That's it, that's the whole job description. ๐
โจ SYNOPSIS โจ
pcp2graphite [-5CGHIjLnrRvV?] [-4 action] [-8|-9 limit] [-a archive]
[-A align] [--archive-folio folio] [-b|-B space-scale] [-c config]
[--container container] [-D debug] [--daemonize] [-e derived] [-E text-
port] [-g server] [-h host] [-i instances] [-J rank] [-K spec] [-N
predicate] [-O origin] [-p pickle-port] [-P|-0 precision] [-q|-Q count-
scale] [-s samples] [-S starttime] [-t interval] [-T endtime] [-x
prefix] [-X pickle-protocol] [-y|-Y time-scale] metricspec [...]
๐ฆ DESCRIPTION ๐ฆ
okay so real talk: pcp2graphite is a customizable performance metrics exporter tool that ships data from PCP over to Graphite. Any performance metric you can think of โ live or archived, system and/or application โ can be picked for exporting, and you get to choose it with either command line arguments or a configuration file. so many options, we love choices ๐
pcp2graphite is a close relative of pmrep(1), like cousins who share a whole personality. Refer to pmrep(1) for the metricspec description accepted on the pcp2graphite command line. And see pmrep.conf(5) for the description of the pcp2graphite.conf configuration file syntax. This page describes pcp2graphite specific options and configuration file differences with pmrep.conf(5). Also, pmrep(1) lists some usage examples, most of which are applicable with pcp2graphite as well. ๐ซถ
Only the command line options listed on this page are supported. Other options available for pmrep(1) are not supported โ do not come for them, they're not here. ๐
Options via environment values (see pmGetOptions(3)) override the corresponding built-in default values (if any). Configuration file options override the corresponding environment variables (if any). Command line options override the corresponding configuration file options (if any). it's giving layers, and the layers matter โจ
๐ CONFIGURATION FILE ๐
pcp2graphite uses a configuration file with syntax described in pmrep.conf(5). The following options are common with pmrep.conf:
version, source, speclocal, derived, header, globals, samples, interval, type, type_prefer, ignore_incompat, names_change, instances, live_filter, rank, limit_filter, limit_filter_force, invert_filter, predicate, omit_flat, precision, precision_force, count_scale, count_scale_force, space_scale, space_scale_force, time_scale, time_scale_force.
The rest of the pmrep.conf options are recognized but ignored for compatibility. (they're there, they just don't do anything, like a group project member ๐ฅฒ)
๐ง pcp2graphite specific options ๐ง
graphite_host(string) โ Specify the destination Graphite server hostname or IP address. Corresponding command line option is-g. Defaults tolocalhost. ๐graphite_port(integer) โ Specify the port number of the Graphite server (plaintext or pickle). Corresponding command line options are-pand-E. Defaults to2004. ๐pickle(boolean) โ Specify whether to use the pickle protocol. Corresponding command line options are-pand-E. Defaults toyes. ๐ฅpickle_protocol(integer) โ Specify the pickle protocol version. Corresponding command line option is-X. Defaults to0. ๐ขprefix(string) โ Specify the prefix for metrics sent to the server. Corresponding command line option is-x. Defaults topcp.. ๐ท๏ธ
๐ OPTIONS ๐
The available command line options are, and yes we're listing every single one, no skips: โจ
-0 precision,--precision-force=precisionโ Like-Pbut this option will override per-metric specifications. ๐ช-4 action,--names-change=actionโ Specify which action to take on receiving a metric names change event during sampling. These events occur when a PMDA discovers new metrics sometime after starting up, and informs running client tools likepcp2graphite. Valid values for action areupdate(refresh metrics being sampled),ignore(do nothing โ the default behaviour) andabort(exit the program if such an event occurs). pick your fighter ๐ฅ-5,--ignore-unknownโ Silently ignore any metric name that cannot be resolved. At least one metric must be found for the tool to start. one survivor minimum, periodt ๐-8 limit,--limit-filter=limitโ Limit results to instances with values above/below limit. A positive integer will include instances with values at or above the limit in reporting. A negative integer will include instances with values at or below the limit in reporting. A value of zero performs no limit filtering. This option will not override possible per-metric specifications. See also-Jand-N. ๐๐-9 limit,--limit-filter-force=limitโ Like-8but this option will override per-metric specifications. ๐ฅ-a archive,--archive=archiveโ Performance metric values are retrieved from the set of Performance Co-Pilot (PCP) archive files identified by the archive argument, 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. ๐๏ธ-A align,--align=alignโ Force the initial sample to be aligned on the boundary of a natural time unit align. Refer toPCPIntro(1)for a complete description of the syntax for align. โฐ--archive-folio=folioโ Read metric source archives from the PCP archive folio created by tools likepmchart(1)or, less often, manually withmkaf(1). ๐-b scale,--space-scale=scaleโ Unit/scale for space (byte) metrics, possible values includebytes,Kbytes,KB,Mbytes,MB, and so forth. This option will not override possible per-metric specifications. See alsopmParseUnitsStr(3). ๐-B scale,--space-scale-force=scaleโ Like-bbut this option will override per-metric specifications. ๐ช-c config,--config=configโ Specify the config file or directory to use. In case config is a directory all files in it ending.confwill be included. The default is the first found of:./pcp2graphite.conf,$HOME/.pcp2graphite.conf,$HOME/pcp/pcp2graphite.conf, and$PCP_SYSCONF_DIR/pcp2graphite.conf. For details, see the above section andpmrep.conf(5). ๐--container=containerโ Fetch performance metrics from the specified container, either local or remote (see-h). ๐ฆ-C,--checkโ Exit before reporting any values, but after parsing the configuration and metrics and printing possible headers. a lil sneak peek, then bye ๐--daemonizeโ Daemonize on startup. ๐-e derived,--derived=derivedโ Specify derived performance metrics. If derived starts with a slash (/) or with a dot (.) it will be interpreted as a PCP derived metrics configuration file, otherwise it will be interpreted as comma- or semicolon-separated derived metric expressions. For complete description of derived metrics and PCP derived metrics configuration files seepmLoadDerivedConfig(3)andpmRegisterDerived(3). Alternatively, usingpmrep.conf(5)configuration syntax allows defining derived metrics as part of metricsets. ๐งฎ
In case of issues with derived metrics, review the aforementioned manual pages in detail and ensure all the required metrics are available, especially when using archives. Use -Dderive to see additional debug information about parsing derived metrics. read it fr fr, don't skip ๐ญ
-E port,--text-port=portโ Graphite server plaintext port. Using this option disables the pickle protocol. ๐ฅ๐ซ-g server,--graphite-host=serverโ Destination Graphite server hostname or IP address. ๐-G,--no-globalsโ Do not include global metrics in reporting (seepmrep.conf(5)). ๐ซ๐-h host,--host=hostโ Fetch performance metrics frompmcd(1)on host, rather than from the defaultlocalhost. ๐ฅ๏ธ-H,--no-headerโ Do not print any headers. โ๏ธ-i instances,--instances=instancesโ Retrieve and report only the specified metric instances. By default all instances, present and future, are reported. ๐ฏ
Refer to pmrep(1) for complete description of this option. ๐
-I,--ignore-incompatโ Ignore incompatible metrics. By default incompatible metrics (that is, their type is unsupported or they cannot be scaled as requested) will causepcp2graphiteto terminate with an error message. With this option all incompatible metrics are silently omitted from reporting. This may be especially useful when requesting non-leaf nodes of the PMNS tree for reporting. ๐ซฅ-j,--live-filterโ Perform instance live filtering. This allows capturing all named instances even if processes are restarted at some point (unlike without live filtering). Performing live filtering over a huge number of instances will add some internal overhead so a bit of user caution is advised. See also-n. โ ๏ธ-J rank,--rank=rankโ Limit results to highest/lowest ranked instances of set-valued metrics. A positive integer will include highest valued instances in reporting. A negative integer will include lowest valued instances in reporting. A value of zero performs no ranking. Ranking does not imply sorting, see-6. See also-8. ๐-K spec,--spec-local=specโ When fetching metrics from a local context (see-L), the-Koption may be used to control the DSO PMDAs that should be made accessible. The spec argument conforms to the syntax described inpmSpecLocalPMDA(3). More than one-Koption may be used. ๐งฉ-L,--local-PMDAโ Use a local context to collect metrics from DSO PMDAs on the local host without PMCD. See also-K. ๐ก-n,--invert-filterโ Perform ranking before live filtering. By default instance live filtering (when requested, see-j) happens before instance ranking (when requested, see-J). With this option the logic is inverted and ranking happens before live filtering. ๐-N predicate,--predicate=predicateโ Specify a comma-separated list of predicate filter reference metrics. By default ranking (see-J) happens for each metric individually. With predicates, ranking is done only for the specified predicate metrics. When reporting, rest of the metrics sharing the same instance domain (seePCPIntro(1)) as the predicate will include only the highest/lowest ranking instances of the corresponding predicate. Ranking does not imply sorting, see-6. ๐ฏ
So for example, using proc.memory.rss (resident memory size of process) as the predicate metric together with proc.io.total_bytes and mem.util.used as metrics to be reported, only the processes using most/least (as per -J) memory will be included when reporting total bytes written by processes. Since mem.util.used is a single-valued metric (thus not sharing the same instance domain as the process related metrics), it will be reported as usual. ๐ธ
-O origin,--origin=originโ okay so when you're reporting archived metrics, this says start here atorigininside the time window (peep-Sand-Tfor that window, bestie). The full tea on whatorigincan look like lives inPCPIntro(1). โจ-p port,--pickle-port=portโ this is the Graphite server's pickle port. The moment you use this option, boom, the pickle protocol is switched on. ๐ฅ-P precision,--precision=precisionโ setsprecisionfor numeric non-integer output values. Default vibe is 3 decimal places (when it even applies). Heads up tho: this will not override any per-metric specifications that might already be in play. ๐-q scale,--count-scale=scaleโ unit/scale for count metrics. Possible values includecount x 10^-1,count,count x 10,count x 10^2, and so on and so forth, all the way from10^-8to10^7. (ngl these values are currently space-sensitive, so watch those spaces.) This one will not override possible per-metric specifications either. See alsopmParseUnitsStr(3). ๐-Q scale,--count-scale-force=scaleโ literally like-qexcept this one will override per-metric specifications. Forceful. Main character. ๐-r,--rawโ outputs raw metric values, so no converting cumulative counters into rates. This option will override possible per-metric specifications. raw is raw fr fr. ๐ฅ-R,--raw-preferโ like-rbut softer โ this one will not override per-metric specifications. It's giving "raw if you want it, no pressure". ๐ซถ-s samples,--samples=samplesโsamplesis how many samples get retrieved and reported. Ifsamplesis0, or if you just don't pass-sat all, thenpcp2graphitewill sample and report continuously (that's real time mode) or until it hits the end of the set of PCP archives (that's archive mode). See also-T. ๐-S starttime,--start=starttimeโ when you're reporting archived metrics, the report gets restricted to only those records logged at or afterstarttime. The full syntax tea forstarttimeis inPCPIntro(1). โญ-t interval,--interval=intervalโ sets the reporting interval to something other than the default1second. Theintervalargument follows the syntax described inPCPIntro(1), and in its simplest form it can just be an unsigned integer (in which case the implied units are seconds, easy). See also the-Toption. ๐-T endtime,--finish=endtimeโ when reporting archived metrics, the report is restricted to records logged before or atendtime. Full syntax deets forendtime?PCPIntro(1), obviously. ๐
When this is used to define the runtime before pcp2graphite exits, and if no samples is given (see -s), then the number of reported samples depends on interval (see -t). If samples is given, then interval gets adjusted so it can report samples during the runtime. And if you give all three of -T, -s, and -t? Then endtime is what determines the actual time pcp2graphite will run. periodt. โฐ
-v,--omit-flatโ reports only set-valued metrics with instances (likedisk.dev.read) and omits those single-valued ``flat'' metrics without instances (likekernel.all.sysfork). See-iand-I. ๐ฆ-V,--versionโ displays the version number and dips. bye bestie ๐-x prefix,--prefix=prefixโ metrics prefix for the measurements sent to the server. โจ-X protocol,--pickle-protocol=protocolโ the pickle protocol version number. ๐ฅ-y scale,--time-scale=scaleโ unit/scale for time metrics. Possible values includenanosec,ns,microsec,us,millisec,ms, and so forth all the way up tohour,hr. This will not override possible per-metric specifications. See alsopmParseUnitsStr(3). ๐ธ-Y scale,--time-scale-force=scaleโ like-ybut this one will override per-metric specifications. boss energy. ๐-?,--helpโ displays the usage message and exits. the classic. ๐
๐ธ FILES ๐ธ
pcp2graphite.confโ thepcp2graphiteconfiguration file (see-c). ๐$PCP_SYSCONF_DIR/pmrep/*.confโ system provided defaultpmrepconfiguration files. โจ
๐ PCP ENVIRONMENT ๐
Environment variables with the prefix PCP_ are used to parameterize the file and directory names that PCP uses. On every installation, the file /etc/pcp.conf contains the local values for these variables. And the $PCP_CONF variable can be used to specify an alternative configuration file, as described in pcp.conf(5). ๐
For environment variables that affect PCP tools, see pmGetOptions(3).
Of particular note: PCP_DISCRETE_ONCE can be set to ensure that discrete metric values are reported only once, unless they change at some point. ๐
๐ DEBUGGING OPTIONS ๐
The -D or --debug option enables the output of additional diagnostics on stderr to help triage problems, although lowkey the information is sometimes cryptic and primarily intended to provide guidance for developers rather than for end-users. debug is a comma separated list of debugging options; use pmdbg(1) with the -l option to obtain a list of the available debugging options and what they mean. ๐ง
โญ SEE ALSO โญ
PCPIntro(1), mkaf(1), pcp(1), pcp2elasticsearch(1), pcp2influxdb(1), pcp2json(1), pcp2spark(1), pcp2xlsx(1), pcp2xml(1), pcp2zabbix(1), pmcd(1), pminfo(1), pmrep(1), pmGetOptions(3), pmLoadDerivedConfig(3), pmParseUnitsStr(3), pmRegisterDerived(3), pmSpecLocalPMDA(3), LOGARCHIVE(5), pcp.conf(5), pmrep.conf(5) and PMNS(5). ๐
and that's the whole page, bestie!! ๐โจ
This one came from Performance Co-Pilot โ the PCP girlies โ and it's the PCP2GRAPHITE(1) manual page. go forth and graphite your metrics, you absolute icon. ๐๐ฆ๐
๐
๐ฆ where this page comes from
- arch rolling: pcp 7.2.2-2 ยท GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 ยท GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 ยท GPL-2.0-or-later AND CC-BY-3.0
- ubuntu stonking: pcp-export-pcp2graphite 7.2.1-2build1
- Copyright (C) 2015-2021 Marko Myllynen <myllynen@redhat.com>
- Copyright (C) 2016-2018 Red Hat
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms