v1

latestOpenAPI 3.0.12026-07-17221165.2 KB
PMAPI HOST SERVICES

Fetches (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)

get/pmapi/fetch

Query parameters

deltastring

Sampling interval in pmParseInterval(3) form

namestring

An individual metric name

namesstring

Comma-separated list of metric names

{"stackTrail":"paths:/pmapi/fetch:get:parameters:3:schema","oasType":"schema","type":"unknown"}

Numeric or pmIDStr(3) metric identifier

pmidsstring

Comma-separated numeric or pmIDStr(3) pmIDs

prefixstring

Metric namespace component as in PMNS(5)

hostspecstring

Host specification as described in PCPIntro(1)

contextnumber

Web context number (optional like hostspec)

polltimeoutnumber

Seconds of inactivity before closing context

clientstring

Request identifier sent back with response

Response

OK