pmrep.conf (5) - Linux Man Pages
pmrep.conf: pmrep configuration file
NAMEpmrep.conf - pmrep configuration file
DESCRIPTIONpmrep is a customizable performance metrics reporting tool. Any available performance metric, live or archived, system and/or application, can be selected for reporting using one of the available output alternatives together with applicable formatting options.
The metrics of interest are named in the metricspec argument(s) on the pmrep command line. These metricspecs define individual metrics or pre-defined performance metric sets to be read from the configuration file described below. For command line argument details see pmrep(1).
The pmrep.conf configuration file allows setting default runtime values and defining any number of custom metricsets for pmrep. A metricset is a user-defined set of arbitrary performance metrics. This allows the user to create specifically crafted metricsets particularly relevant for their application or environment. Instead of being dependent on what existing tools provide or collecting the needed data with several disjoint utilities the user can create and modify custom metricsets by editing pmrep.conf. See below for the metricset specification.
FILE FORMATThe file has an ini-style syntax and consists of sections and parameters. A section begins with the name of the section in square brackets and continues until the next section begins. An example section with two parameters follows:
[section] key = value key2 = value2
The data types used are string (no quotes needed), integer, and bool (with values of yes or no).
A line comment starts with a hash sign (``#'') or a semicolon (``;''). Inline comments are not supported.
pmrep.conf must be readable by the user invoking pmrep.
Any parameter described below with a corresponding command line parameter contains additional description in pmrep(1).
The [options] sectionThe [options] section is read every time pmrep is run and it defines the default runtime values (which may be overridden by the corresponding command line options). Metric specifications are not allowed in this section.
- Indicates the configuration file version. Defaults to 1. The only currently supported value is 1.
- Indicates the source for metrics. Interpreted as a PCP archive if the string contains a slash (``/''), otherwise interpreted as a hostname. Corresponding command line paraters are -a and -h. Defaults to local: (see PCPIntro(1)).
- Indicates the output target. Corresponding command line parameter is -o. For supported output targets, see pmrep(1). Defaults to stdout.
- Derived metric specifications. Corresponding command line parameter is -e. For syntax description, see pmrep(1). Undefined by default.
- Indicates whether to print headers. Corresponding command line parameter is -H. Defaults to yes.
- Indicates whether to include unit information as part of headers. Corresponding command line parameter is -U. Defaults to yes.
- Indicates whether to include metrics from the [global] section (see below) for reporting. Corresponding command line parameter is -G. Defaults to yes.
- Indicates whether to print the timestamp. Corresponding command line parameter is -p. Defaults to no.
- Indicates the number of samples to print. Corresponding command line parameter is -s. Undefined by default (meaning unlimited number of samples if not limited by other options).
- Indicates the interval between samples. Corresponding command line parameter is -o. Follows the time syntax described in PCPIntro(1). Defaults to 1s.
- Indicates whether to pause between samples when replaying from an archive rather than replaying at full speed. Corresponding command line parameter is -d. Defaults to no.
- Indicates whether to output raw metric values by disabling all rate conversions or convert cumulative counters to rates (default). Corresponding command line parameter is -r. Allowed values are default or raw.
- Indicates the width of stdout output columns. Corresponding command line parameter is -w. Forced minimum is 3. Defaults to the shortest width that can fit the metric label.
- Indicates how many decimals to use for numeric non-integer output values. Corresponding command line parameter is -P. Defaults to 3.
- Indicates the column separator. Corresponding command line parameter is -l. Default depends on the output target, see pmrep(1).
- Indicates whether to print extended header. Corresponding command line parameter is -x. Defaults to no.
- Indicates how often to repeat the header. Corresponding command line parameter is -E. Defaults to 0.
- Indicates the format string for formatting the timestamp. Corresponding command line parameter is -f. Defaults to %H:%M:%S.
- Indicates whether to interpolate reported archive values. Corresponding command line parameter is -u. See pmrep(1) for complete description. Defaults to yes.
- Indicates the unit/scale for counter metrics. Corresponding command line parameter is -q. For supported syntax, see pmrep(1). Undefined (no scaling) by default.
- Indicates the unit/scale for space metrics. Corresponding command line parameter is -b. For supported syntax, see pmrep(1). Undefined (no scaling) by default.
- Indicates the unit/scale for time metrics. Corresponding command line parameter is -y. For supported syntax, see pmrep(1). Undefined (no scaling) by default.
Output target specific parameters
- The following parameters are also accepted in the [options] section but are typically used only in custom sections as they are applicable only to certain output targets.
zabbix_server (string) (zabbix output target only)
- Hostname or IP address of Zabbix server to send the metrics to. If a host is monitored by a proxy, proxy hostname or IP address should be used instead. Undefined by default.
zabbix_port (integer) (zabbix output target only)
- Specify port number of server trapper running on the server. Default is 10051.
zabbix_host (string) (zabbix output target only)
- Specify agent hostname as registered in Zabbix frontend. Host IP address and DNS name will not work. Undefined by default.
zabbix_interval (string) (zabbix output target only)
- Indicates the interval to send the metrics to the Zabbix server. This can be longer than the generic interval to minimize the overhead when communicating with the server (as each send creates a new connection). Follows the time syntax described in PCPIntro(1). Defaults to the generic interval. Zabbix tools send at most 250 metrics at a time. Ignored when reading metrics from PCP archives, in which case metrics will be sent roughly at 250 metric batches.
The [global] sectionThe [global] section is used to define metrics that will be reported in addition to any other separately defined metrics or metricsets. Configuration parameters are not allowed in this section. Global metrics are reported by default, the command line option -G or the configuration file parameter globals can be used to disable global metrics.
- No predefined parameters, only metricspecs allowed in this section. See below for the metricspec specification.
CUSTOM SECTIONSAny other section than [options] or [global] will be interpreted as a new metricset specification. The section name is arbitrary, typically a reference to its coverage or purpose. A custom section can contain options, metricspecs, or both.
All the metrics specified in a custom section will be reported when pmrep is instructed to use the particular custom section. pmrep can be executed with more than one custom section (i.e., metricset) defined in which case the combination of all the metrics specified in them will be reported.
- Any option valid in the [options] section is also valid in a custom section. Any option or metric defined in the custom section will override the same option or metric possibly defined earlier in the [options] section. See below for the metricspec specification.
METRICSET SPECIFICATIONThere are three forms of the metricspec. First, on the command line a metricspec can start with a colon (``:'') to indicate a reference to a metricset to be read from the pmrep configuration file. Second, the compact form of a metricspec is a one-line metric specification which can be used both on the command line and in the [global] and custom sections of the configuration file. The only difference of its usage in the configuration file is that the metric name is used as the key and the optional specifiers as values. The compact form of the metricspec is specified in detail in pmrep(1). The third, verbose form of a metricspec is valid only in the configuration file.
A key containing a dot (``.'') is interpreted as a metric name (see above), a non-option key not containing a dot is interpreted as an identifier (see below).
The verbose form of a metricspec starts with a declaration consisting of a mandatory identifier as the key and the actual performance metric name (a PMNS leaf node) as its value. This equals to the compact form of the metricspec defining the same performance metric without any of optional specifiers defined. The identifier is arbitrary and is not used otherwise except for binding the below specifiers and the metric together.
The following specifiers are optional in the verbose form and can be used as keys in any order with an earlier declared identifier followed by a dot and the specifier (as in identifier.specifier):
- Defines a text label for the metric used by supporting output targets.
- Defines the needed arithmetic expression for the metric. For details see pmRegisterDerived(3).
- This specifier is currently recognized but not implemented.
- Defines the unit/scale conversion for the metric. Needs to be dimension-compatible and is used with non-string and (currently) non-raw metrics. For allowed values, see pmrep(1).
- If set to raw rate conversion for the metric will be disabled.
- Defines the width of the output column for the metric.
EXAMPLEThe following example contains a short [options] section setting some locally wanted default values. It then goes on to define the global metrics kernel.all.sysfork using the compact form and mem.util.allcache using the verbose form of a metricspec. The latter is a derived metric using the later specified formula. Both of these metrics will be included in reporting unless disabled with -G or globals = no.
Three different metricsets are also specified: db1, db2, and sar-w.
The DB sets define a host to be used as the source for the metrics. Both use the verbose form of a metricspec (as the non-option key set does not contain the dot) to include all postgresql related metrics.
The sar-w set is an example how to mimic an existing tool with pmrep.
[options] timestamp = yes interval = 2s extheader = yes repeat_header = 20 space_scale = MB [global] kernel.all.sysfork = forks,,,,8 allcache = mem.util.allcache allcache.formula = mem.util.bufmem + mem.util.cached + mem.util.slab [db1] source = db-host1.example.com set = postgresql [db2] source = db-host2.example.com set = postgresql [sar-w] header = yes unitinfo = no globals = no timestamp = yes interval = 1s extheader = no precision = 2 sysfork = kernel.all.sysfork sysfork.label = proc/s sysfork.width = 11 pswitch = kernel.all.pswitch pswitch.label = cswch/s pswitch.width = 8
- Default configuration file.
- Example configuration file.