GET /metrics/v2/<OPERATION>
On this page:
Retrieve orchestrator service metrics data or metadata.
Request format
When Forming metrics API requests to this endpoint, you must specify an operation. Some operations also require you to specify a query. For example:
GET /metrics/v2/<OPERATION>/<QUERY>
As a starting point, use the list operation to get a
list of all valid
MBeans:
GET /metrics/v2/list
Using information returned from the list operation,
you can form more complex and targeted queries. For example, this request uses the
read operation to query registered logger
names:
GET /metrics/v2/read/java.until.logging:type=Logging/LoggerNames
The request format to query MBeans is:
GET /metrics/v2/read/<MBEAN_NAMES>/<ATTRIBUTES>/<INNER_PATH_FILTER>
MBean names are created by joining the first two keys in the list response's value object with a
colon (which are the domain and prop list, in Jolokia terms), such as java.until.logging:type=Logging.
Attributes are derived from the attr object, which is
within the value object in the list response.
If you specify multiple MBean names or attributes, use comma separation, such as:
/java.lang:name=*,type=GarbageCollector/
The inner path filter is optional and depends on the MBeans and attributes you are querying.
You must use the read operation to query MBeans.
For more complex queries, or queries containing special characters, use POST /metrics/v2/<OPERATION>.
Response format
A successful request returns a JSON object containing a series of objects, arrays, and/or key-value pairs describing metrics data or metadata, based on the content of the request.
For example, the response to GET /metrics/v2/list
contains metadata about MBeans you can use to create targeted queries, such
as:
{
"request": {
"type": "list"
},
"value": {
"java.util.logging": {
"type=Logging": {
"op": {
"getLoggerLevel": {
...
},
...
},
"attr": {
"LoggerNames": {
"rw": false,
"type": "[Ljava.lang.String;",
"desc": "LoggerNames"
},
"ObjectName": {
"rw": false,
"type": "javax.management.ObjectName",
"desc": "ObjectName"
}
},
"desc": "Information on the management interface of the MBean"
}
},
...
}
}
In contrast, the response to a targeted query, such as /metrics/v2/read/java.until.logging:type=Logging/LoggerNames, contains
more specific data. For example:
{
"request": {
"mbean": "java.util.logging:type=Logging",
"attribute": "LoggerNames",
"type": "read"
},
"value": [
"javax.management.snmp",
"global",
"javax.management.notification",
"javax.management.modelmbean",
"javax.management.timer",
"javax.management",
"javax.management.mlet",
"javax.management.mbeanserver",
"javax.management.snmp.daemon",
"javax.management.relation",
"javax.management.monitor",
"javax.management.misc",
""
],
"timestamp": 1497977258,
"status": 200
}






