PMDAJSON(1)
β¨ NAME β¨
okay so bestie, this is pmdajson β the JSON PMDA π
(that's a Performance Metrics Domain Agent, iykyk). It's the little icon that exports metrics from literally any source that spits out JavaScript Object Notation (JSON). No cap. π¦
πΈ DESCRIPTION πΈ
pmdajson is a Performance Metrics Domain Agent (PMDA) that exports metrics from arbitrary sources generating JavaScript Object Notation (JSON) syntax. slay.
Here's the tea, bestie: for pmdajson to actually feed metrics to PCP clients, you need at least one pair of JSON inputs. Not one. A pair. π«Ά
- one that describes the metric metadata
- one that holds the actual metric values data
The metadata gets read once from a file at PMDA startup. The data, though? The data gets read every single time a PCP client asks for metric values. Every. Time. π
That data can come from either a JSON file or an external command generating JSON output β your choice, main character.
And because we're extra: you can use more than one pair of JSON inputs to support an arbitrary number of metric sources in different configured directories. The more the merrier fr fr π
The overall JSON format description lives at http://www.json.org/ β go peek if you want the lore.
π JSON DATA SOURCES π
pmdajson reads a mandatory JSON configuration file:
$PCP_PMDAS_DIR/json/config.json
This file can contain the following PMDA options using the JSON syntax:
directory_listtrusted_directory_list
pmdajson searches the directories listed for these options looking for files named metadata.json and (by default) data.json. π
The JSON metadata files describe the metric names, types, and other details of the associated JSON metric data. The JSON data file name is configurable, and can also be an external command instead of a periodically updated (by external tools) data file. π
Each of these found JSON file/command pairs form a JSON data source.
π Example time π
Let's assume the following simple JSON data file that contains values for two metrics β one of type string and one numeric:
{
"string_value": "testing, 1, 2, 3",
"read_count": 0
}
For these metrics the metadata file needed by pmdajson would be:
{
"metrics": [
{
"name": "string_value",
"pointer": "/string_value",
"type": "string"
},
{
"name": "read_count",
"pointer": "/read_count",
"type": "integer",
"description": "Times values read"
}
]
}
For further details on the JSON metadata format and options, see the README file included as part of pmdajson installation. π
π SECURITY MODEL π
okay this part is important so listen up bestie, no scrolling past π
JSON data sources listed for the directory_list option are not trusted, meaning that if external commands to generate the needed JSON data are used, these commands are run as user nobody.
JSON data sources listed for the trusted_directory_list option are trusted, meaning that if external commands to generate the needed JSON data are used, these commands are run as user root. π³
β οΈ running stuff as root is the vibe check of this whole page β make sure you actually trust it before you trust-list it, fr.
For further details on security and description on running external commands, see the README file included as part of pmdajson installation.
π INSTALLATION π
Install the JSON PMDA by using the Install script as root:
# cd $PCP_PMDAS_DIR/json
# ./Install
To uninstall, do the following as root:
# cd $PCP_PMDAS_DIR/json
# ./Remove
pmdajson is launched by pmcd(1) and should never be executed directly. It's giving backstage pass only β pmcd(1) handles the intro. π
The Install and Remove scripts notify pmcd(1) when the agent is installed or removed. Teamwork makes the dream work β¨
π FILES π
$PCP_PMDAS_DIR/json/READMEβ additional documentation forpmdajsonused JSON files$PCP_PMDAS_DIR/json/config.jsonβ configuration file for thepmdajsonagent$PCP_PMDAS_DIR/json/Installβ installation script for thepmdajsonagent$PCP_PMDAS_DIR/json/Removeβ undo installation script for thepmdajsonagent$PCP_LOG_DIR/pmcd/json.logβ default log file for messages from thepmdajsonagent
π± 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). Obsessed with a configurable config, honestly.
π SEE ALSO π
PCPIntro(1), pmcd(1) and pminfo(1).
Performance Co-Pilot β’ PCP β’ PMDAJSON(1) β that's the source/version and date energy right there, bestie. mwah, go export some metrics, you ate πβ¨ππ¦
π¦ where this page comes from
- centos-stream 9: pcp-doc 6.3.7-14.el9 Β· GPL-2.0-or-later AND CC-BY-3.0
- debian trixie: pcp 6.3.8-1
- ubuntu questing: pcp 6.3.8-1
- Copyright (c) 2015-2018 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms