Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager Command, Definition File and API Reference


5.11.1 Metric list acquisition

Description

Gets the list of metrics for time-series data that can be obtained through the SID of the specified IM management node.

Execution permissions
  • JP1_Console_Admin

  • JP1_Console_Operator

  • JP1_Console_User

API version

v1

Format
Request line
POST /application/component/apiVersion/nodes/metrics httpVersion
Request message body
{
    "sid": IM-management-node-SID
}
Response message body
{
    "metrics": [
      {
        "name": metric,
        "label": metric-display-name,
        "category": category-of-the-metric,
        "description": description-of-the-metric,
        "default": default-setting
      }
      ...
      ]
}
Parameters
sid

Specifies the SID (management object ID). This parameter cannot be omitted.

Status codes

Status code

Message

Description

200

None

Processing of the metric list acquisition REST API was successful.

400

KAJY22009-E

The metric list acquisition REST API cannot be executed due to an invalid parameter of the metric list acquisition REST API.

KAJY22011-E

A nonexistent SID has been specified.

403

KAJY01000-E

There is no permission to run the REST API.

500

KAJY22007-E

An attempt to obtain the list of metrics failed.

KAJY22008-E

The obtained data is invalid.

Return values

The following information is returned in the response body if the status code is 200:

No.

Member name

Data type

Description

1

metrics

object[]

The list of obtained metrics is returned as an array.

2

name

string

Is filled with the metric name.

3

label

string

Is filled with the display name of the metric.

If not specified, it is omitted.

4

category

string

Is filled with the category for the metric.

If not specified, it is omitted.

5

description

string

Is filled with the description of the metric.

If not specified, it is omitted.

6

default

boolean

Is filled with whether it is the default metric name.

  • true: Default metric

  • false: Non-default metric

Examples

The following shows a usage example of the API to get the list of metrics for a service (sid: _JP1PFM-M_HOST2/_JP1PFM-AHOST_HOST20/_HOST_HOST20/_JP1PFM-A_serviceID) of a PFM agent that is a management object.

Request:
POST http://hostname:20703/im/api/v1/nodes/metrics
{
"sid":"_JP1PFM-M_HOST2/_JP1PFM-AHOST_HOST20/_HOST_HOST20/_JP1PFM-A_serviceID"
}
Response:
{
    "metrics": [
         {
               "name":"cpu_used_rate",
               "label":"CPU usage",
               "description":"Processer usage (%). Percentage of the elapsed time where the processor used a thread that is not idle. (Units: %)",
               "default":true
    } ...
  ]
}