Hitachi

JP1 Version 12 JP1/Performance Management Reference


Metric definition file (metrics_product-ID.conf)

Organization of this page

Function

The metric definition file is the file for adding, editing, or deleting the metrics to be used in JP1/IM2. The model file for metric definitions is provided to you when you install JP1/IM2.

When you want to reset the metric definition file to the state it was in immediately after the installation of JP1/IM2, overwrite the metric definition file with the model file.

For details on the file permission for the metric definition file, see the JP1/IM2 manual.

Name of file

metrics_product-ID.conf (Metric definition file)

metrics_product-ID.conf.model (Model file for metric definitions)

Location

In Windows:
  • For physical hosts:

    installation-folder-of-JP1/IM2\conf\imdd\plugin\jp1pfm

  • For logical hosts:

    environment-directory\jp1imm\conf\imdd\plugin\jp1pfm

In UNIX:
  • For physical hosts:

    /var/opt/jp1imm/conf/imdd/plugin/jp1pfm/

  • For logical hosts:

    environment-directory/jp1imm/conf/imdd/plugin/jp1pfm/

Timing of applying definition information

The definition information is applied immediately after you save the metric definition file.

How to modify

You can edit the metric definition file as follows:

  1. Open the metrics_product-ID.conf file in a text editor.

  2. Edit the metrics_product-ID.conf file.

  3. Save the metrics_product-ID.conf file, and close it.

  4. Confirm that the format of the edited file is correct.

    You can check the format of the edited file by using one of the following methods:

    • By using the Integrated Operation Viewer of JP1/IM2, display a chart showing the trend information derived from all metrics you have added or edited.

    • By using the metric list acquisition API and the time-series data acquisition API provided by JP1/IM2, acquire performance data derived from all metrics you have added or edited.

    If the format of the edited file is correct, you can display or acquire trend information derived from the metrics you have added or edited.

    If the format of the edited file is incorrect, an error message is either displayed or returned. By following the instructions provided in the error message, correct the metrics_product-ID.conf file and then try displaying or acquiring trend information again.

    For details on how to operate the Integrated Operation Viewer of JP1/IM2 and how to use REST APIs (metric list acquisition API and time-series data acquisition API), see the JP1/IM2 manual or document.

Note:

When the display or acquisition of trend information by the Integrated Operation Viewer of JP1/IM2 or a REST API coincides with the saving of the metrics_product-ID.conf file, the file might not be read correctly, which results in an error message being displayed. In this case, try displaying or acquiring trend information again.

Setting items

Create a metric definition file with the following format.

Table 4‒18: Format of a metric definition file

Item

Format

Format

JSON

Character code

UTF-8

Line feed code

One of the following:

  • CR+LF

  • CR

  • LF

Number of metrics that can be defined in a file

1 to 100

The JSON-format metric definition file is shown below. Arrays of metric information are specified in a metric definition file. One metric information item is specified in each object, which is one of the elements of an array.

[
  {
    "name":"metric-name",
    "default":whether-the-default-is-selected,
    "resource_en":{
      "category":"category-(English)-for-the-metric",
      "label":"display-name-(English)-for-the-metric",
      "description":"description-(English)-for-the-metric",
      "unit":"unit-(English)-for-the-music"
    },
    "resource_ja":{
      "category":"category-(Japanese)-for-the-metric",
      "label":"display-name-(Japanese)-for-the-metric",
      "description":"description-(Japanese)-for-the-metric",
      "unit":"unit-(Japanese)-for-the-music"
    },
    "recordId":"record-ID",
    "fieldId":"field-ID",
    "filter": [
      {
        "fieldId":"field-ID-to-be-filtered",
        "operator":"comparison-operator",
        "value":"value-against-which-to-compare-performance-data",
      }, ...
    ],
    "summarizationRule":"summarization-rule"
  }, ...
]

The table below describes the items to be set in the metric definition file.

Table 4‒19: Items set in the metric definition file

Member name

Can be omitted?

Type

Value to be set

name

N

string

Set a metric-name.

It must be 1 to 255 characters long and contain the following alphanumeric characters and symbols:

  • Numbers (0-9)

  • Hyphen (-)

  • Underscore (_)

  • Alphabet letters (A-Z, a-z)

Set a metric name that is unique within the metric definition file.

default

Y

boolean

Set a whether-the-default-is-selected.

Specify whether to use the default metric.

  • true: The default metric is used.

  • false: The default metric is not used.

When this value is omitted, the default metric is not used.

In each metric definition file, you can set 0 to 10 metrics to true.

resource_en

N

object

Set resource information (English) for the metric.

category

Y

string

Set a category-(English)-for-the-metric.

It must be 1 to 255 characters long and must not contain control characters (0x00 to 0x1F, and 0x7F to 0x9F).

When this value is omitted, no category is set for the metric.

label

Y

string

Set a display-name-(English)-for-the-metric.

It must be 1 to 255 characters long and must not contain control characters (0x00 to 0x1F, and 0x7F to 0x9F).

When this value is omitted, the setting specified for the name member is used as the display name of the metric on the Trends tab of the Integrated Operation Viewer window. Furthermore, the display name of the metric is not returned by the metric list acquisition API.

description

Y

string

Set a description-(English)-for-the-metric.

It must be 1 to 1,023 characters long and must not contain control characters (0x00 to 0x1F, and 0x7F to 0x9F).

Depending on the Web browser used, not all characters might be displayed when you view this item by using the Integrated Operation Viewer of JP1/IM2.

When this value is omitted, no description of the metric shows up on the Trends tab of the Integrated Operation Viewer window. Similarly, no description of the metric is returned by the metric list acquisition API.

unit

N

string

Set a unit-(English)-for-the-metric.

It must be 1 to 255 characters long and must not contain control characters (0x00 to 0x1F, and 0x7F to 0x9F).

resource_ja

Y

object

Set resource information (Japanese) for the metric.

When this value is omitted, the setting specified for resource_en is used instead.

category

Y

string

Set a category-(Japanese)-for-the-metric.

It must be 1 to 255 characters long and must not contain control characters (0x00 to 0x1F, and 0x7F to 0x9F).

When this value is omitted, the setting specified for category of resource_en is used instead.

label

Y

string

Set a display-name-(Japanese)-for-the-metric.

It must be 1 to 255 characters long and must not contain control characters (0x00 to 0x1F, and 0x7F to 0x9F).

When this value is omitted, the setting specified for label of reseource_en is used instead.

description

Y

string

Set a description-(Japanese)-for-the-metric.

It must be 1 to 1,023 characters long and must not contain control characters (0x00 to 0x1F, and 0x7F to 0x9F).

Depending on the Web browser used, not all characters might be displayed when you view this item by using the Integrated Operation Viewer of JP1/IM2.

When this value is omitted, the setting specified for description of reseource_en is used instead.

unit

Y

string

Set a unit-(Japanese)-for-the-metric.

It must be 1 to 255 characters long and must not contain control characters (0x00 to 0x1F, and 0x7F to 0x9F).

When this value is omitted, the setting specified for unit of reseource_en is used instead.

recordId

N

string

Set a record-ID.

Specify a record ID of the performance data corresponding to the metric.

Specify a record ID of either the PI record type or PD record type. You cannot specify a record ID of the PL record type or PA record type.

fieldId

N

string

Set a field-ID.

Specify a field ID of the performance data corresponding to the metric. The specified field ID must have the following format:

record-ID_PFM - Manager-name-of-the field

The data type of a field ID must be numbers (with the exception of time_t). If not, trend information will not be displayed. Furthermore, performance data is not returned by the time-series data acquisition API.

filter

Y

object[]

Set a filter to be applied when acquiring performance data from the Store database.

Performance data matching all the set filters is acquired.

When this value is omitted, or when no filter is specified, no filtering is performed.

fieldId

N

string

Set a field-ID-to-be-filtered.

The specified field ID must have the following format:

record-ID_PFM - Manager-name-of-the field

operator

Y

string

Set a comparison-operator.

Specify one of the following values:

  • =: The field value is equal to value.

  • <>: The field value is different from value.

  • <: The field value is smaller than value.

  • <=: The field value is equal to or smaller than value.

  • >: The field value is larger than value.

  • >=: The field value is equal to or larger than value.

When this value is omitted, it is assumed that = is specified.

value

N

string

Set a value-against-which-to-compare-performance-data.

The specified value must be compliant with one of the formats specified in either the PFM - Agent manual or the PFM - RM manual.

It must be no longer than 2,048 bytes and must not contain control characters (0x00 to 0x1F, and 0x7F to 0x9F) or the following symbols: ( ) [ ] < > = ".

The specifiable range is as follows:

Characters

Just type in the characters you want to specify. Note, however, that an asterisk (*) will be treated as a wild card.

Integers

Specify an integer that does not fall outside the range of values specifiable for the data type of the field (-2,147,483,648 to 2,147,483,647).

If, however, the data type of the target field is ulong, specify an integer that does not fall outside the range set with condExpValueUlongExtension parameter in the initial settings file (config.xml). For details, see Initialization file settings (config.xml).

Decimal numbers

Specify decimal numbers that do not fall outside the range of values specifiable for the data type of the field.

If the data type of the target field is float or double and there are more than three digits after the decimal point, round it off to three decimal places.

If the data type of the target field is utime and there are more than six digits after the decimal point, round it off to six decimal places.

Date

Specify UTC date and time in ISO-8601 extended format ("YYYY-MM-DDThh:mm:ssZ").

To specify date and time in a time zone other than UTC, replace Z at the end of the value with +hh:mm or -hh:mm, which denotes time difference from UTC.

summarizationRule

Y

string

Set a summarization-rule.

Specify a summarization rule#1 to be applied when the performance data of Performance Management exceeds the maximum number of data items per instance (which is one of the specification conditions). This rule is applied to the displayed trend information or to the data acquired with the time-series data acquisition API.

Specify one of the following values (only lowercase letters are allowed):

  • average: Takes an average of all data items.#2, #3

  • sum: Sums up the values of all data items to be summarized.#3

  • high: Sets the largest value of all data items to be summarized.

  • low: Sets the smallest value of all data items to be summarized.

When this value is omitted, data will not be summarized. Instead, data items are displayed or returned starting from the one with the most recent date and time, until the maximum limit is reached.

Legend:

Y: Yes (Can be omitted.)

N: No (Cannot be omitted.)

#1

n adjacent data items are summarized, where n is the calculation result of number of data items/maximum number of data items allowed rounded up to the next whole number. The newest date and time among the summarized data items is used as the date and time of the summarized data.

For example, data can be summarized as follows:

(Example 1) When data is summarized under the following conditions: number of data items = 6, maximum number of data items allowed = 5, summarization rule = average:

In this case, n = 2. The values of two adjacent data items are therefore summarized and averaged.

Performance data of Performance Management

Data summarized with the JP1/PFM plug-in

Date and time

Data

Date and time

Data

2019/01/01 00:00:00

1

2019/01/01 00:01:00

1.5

2019/01/01 00:01:00

2

2019/01/01 00:02:00

3

2019/01/01 00:03:00

3.5

2019/01/01 00:03:00

4

2019/01/01 00:04:00

5

2019/01/01 00:05:00

5.5

2019/01/01 00:05:00

6

(Example 2) When data is summarized under the following conditions: number of data items = 8, maximum number of data items allowed = 8, summarization rule = sum:

In this case, n = 3. The values of three adjacent data items are therefore summarized and summed up. Because data items in this example cannot be divided evenly by 3, there would be two remaining data items. In this case, the values of the remaining two data items are just summarized and summed up.

Performance data of Performance Management

Data summarized with the JP1/PFM plug-in

Date and time

Data

Date and time

Data

2019/01/01 00:00:00

1

2019/01/01 00:02:00

6

2019/01/01 00:01:00

2

2019/01/01 00:02:00

3

2019/01/01 00:03:00

4

2019/01/01 00:05:00

15

2019/01/01 00:04:00

5

2019/01/01 00:05:00

6

2019/01/01 00:06:00

7

2019/01/01 00:07:00

15

2019/01/01 00:07:00

8

#2

In the case of records of the PI record type, summarized data is stored in the Store database. If AVG is set as the summarization rule for the records and average is set as the summarization rule for the metrics, the average of the averages is calculated.

No problem can occur when no change has been made to the collection interval. If, however, a change has been made to the collection interval, and data items having different collection intervals are to be summarized, caution is advised because the calculated average is not precise.

#3

The maximum value and the minimum value that can be specified for the data item to be summarized are 1.797E308 and -1.797E308, respectively. When the summarization rule sum (total value) or average (average = total value / number of data items) is applied to the calculation, if the total value of the data items to be summarized exceeds the maximum value, calculation is performed by using the maximum value as the total value. Similarly, when the total value of the data items to be summarized falls below the minimum value, calculation is performed by using the minimum value as the total value.

Definition example

An example of the coding for a metric definition file is shown below, which is applicable when you add metrics from the Windows version of JP1/Performance Management - Agent Option for Platform to JP1/IM2.

[
  {
    "name":"cpu_used_rate",
    "default":true,
    "resource_en":{
      "label":"CPU used rate",
      "description":"Processor usage. Percentage of elapsed time used by the processor for executing non-idle threads. [Units: %]",
      "unit":"%"
    },
    "recordId":"PI",
    "fieldId":"PI_PCT_TOTAL_PROCESSOR_TIME",
    "summarizationRule":"average"
  },
  {
    "name":"memory_unused",
    "default":false,
    "resource_en":{
      "label":"Memory unused",
      "description":"Available size in the physical memory area. The combined total of zero memory, free memory, and standby memory (cached) that can be immediately allocated to a process or be used by the system. [Units: MB]",
      "unit":"MB"
    },
    "recordId":"PI",
    "fieldId":"PI_AVAILABLE_BYTES",
    "summarizationRule":"low"
  },
  {
    "name":"disk_unused",
    "default":false,
    "resource_en":{
      "label":"Disk unused",
      "description":"Size of the unused area of the disk. [Units: MB]",
      "unit":"MB"
    },
    "recordId":"PI_LOGD",
    "fieldId":"PI_LOGD_FREE_MEGABYTES",
    "summarizationRule":"low"
  },
  {
    "name":"disk_busy_rate",
    "default":false,
    "resource_en":{
      "label":"Disk busy rate",
      "description":"Percentage of time the disk was busy when a read or write request was processed. [Units: %]",
      "unit":"%"
    },
    "recordId":"PI_PHYD",
    "fieldId":"PI_PHYD_PCT_DISK_TIME",
    "summarizationRule":"average"
  },
  {
    "name":"network_sent",
    "default":false,
    "resource_en":{
      "label":"Network sent",
      "description":"Rate at which packets were sent throughthe network interface. [Units: packets/second]",
      "unit":"packets/second"
    },
    "recordId":"PI_NETI",
    "fieldId":"PI_NETI_PACKETS_SENT_PER_SEC",
    "summarizationRule":"average"
  },
  {
    "name":"network_received",
    "default":false,
    "resource_en":{
      "label":"Network received",
      "description":"Rate at which packets were receivedthrough the network interface. [Units: packets/second]",
      "unit":"packets/second"
    },
    "recordId":"PI_NETI",
    "fieldId":"PI_NETI_PACKETS_RECEIVED_PER_SEC",
    "summarizationRule":"average"
  }
]