pmdajson(1) — Linux manual page

NAME | DESCRIPTION | JSON DATA SOURCES | SECURITY MODEL | INSTALLATION | FILES | PCP ENVIRONMENT | SEE ALSO | COLOPHON

PMDAJSON(1)              General Commands Manual             PMDAJSON(1)

NAME         top

       pmdajson - JSON PMDA

DESCRIPTION         top

       pmdajson is a Performance Metrics Domain Agent (PMDA) which
       exports metrics from arbitrary sources generating JavaScript
       Object Notation (JSON) syntax.

       At least one pair of JSON inputs are required for pmdajson to
       provide metrics for PCP clients; one describing metric metadata
       and one containing metric values data.  Metadata is read once
       from a file at PMDA startup while the data is read every time a
       request for metric values is made by a PCP client.  The data is
       read either from a JSON file or an external command generating
       JSON output.  More than one pair of JSON inputs can be used to
       support arbitrary number of metric sources in different
       configured directories.

       The overall JSON format description is at http://www.json.org/ .

JSON DATA SOURCES         top

       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_list
           • trusted_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.

       For example, let us 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         top

       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.

       For further details on security and description on running
       external commands, see the README file included as part of
       pmdajson installation.

INSTALLATION         top

       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.  The Install and Remove scripts notify pmcd(1) when the
       agent is installed or removed.

FILES         top

       $PCP_PMDAS_DIR/json/README
              additional documentation for pmdajson used JSON files

       $PCP_PMDAS_DIR/json/config.json
              configuration file for the pmdajson agent

       $PCP_PMDAS_DIR/json/Install
              installation script for the pmdajson agent

       $PCP_PMDAS_DIR/json/Remove
              undo installation script for the pmdajson agent

       $PCP_LOG_DIR/pmcd/json.log
              default log file for messages from the pmdajson agent

PCP ENVIRONMENT         top

       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).

SEE ALSO         top

       PCPIntro(1), pmcd(1) and pminfo(1).

COLOPHON         top

       This page is part of the PCP (Performance Co-Pilot) project.
       Information about the project can be found at 
       ⟨http://www.pcp.io/⟩.  If you have a bug report for this manual
       page, send it to [email protected].  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/performancecopilot/pcp.git⟩ on 2024-06-14.
       (At that time, the date of the most recent commit that was found
       in the repository was 2024-06-14.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       [email protected]

Performance Co-Pilot               PCP                       PMDAJSON(1)