v1
latestOpenAPI 3.0.12026-07-17221165.2 KBFetches (samples) current values for given metrics
If any of the names or pmids provided are valid, the response is a JSON document that provides the values for all instances of the metrics, unless a instance profile has been set for the web context (see section on InDom profiles below).
$ curl -s http://localhost:44322/pmapi/fetch?names=kernel.all.load,disk.all.read | pmjson
The response fields map directly to fields from the underlying pmFetch(3) sampling interface.
Numeric metric types are represented as JSON integer or floating-point values. Strings are passed verbatim, except that non-ASCII values are replaced with a Unicode 0xFFFD replacement character code.
In backward compatibility mode the timestamp is presented as a JSON map with second (sec) and microsecond (us) fields, instead of using the more compact floating point representation shown above.
Reference: pmFetch(3)
Query parameters
Sampling interval in pmParseInterval(3) form
An individual metric name
Comma-separated list of metric names
Numeric or pmIDStr(3) metric identifier
Comma-separated numeric or pmIDStr(3) pmIDs
Metric namespace component as in PMNS(5)
Host specification as described in PCPIntro(1)
Web context number (optional like hostspec)
Seconds of inactivity before closing context
Request identifier sent back with response
Response
OK