Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager Command, Definition File and API Reference


4.5.17 jp1TrendDataService.getTrendData

This method retrieves trend data (time series data) from the trend data management DB.

Here are the details of the jp1TrendDataService.getTrendData method:

Method name

Object jp1TrendDataService.getTrendData(String jp1user, String sid, String promQLQuery, String starttime, String endtime, String step)

Parameters
jp1user

Specify the JP1 user name in the range of 1~31 bytes.

If the SID specified by the sid argument specifies a SID for which the JP1 user specified by the jp1user argument does not have reference authority*, 0 data records are returned.

Note: This applies when a JP1 resource group with one of the following JP1 authorization levels is not set to the SID specified in the argument sid among the JP1 resource groups set for the JP1 user.

  • JP1_Console_Admin

  • JP1_Console_Operator

  • JP1_Console_User

sid

Specifies the SID for the configuration information.

If the replacement string "$jp1im_TrendData_labels" is included in PromQL expression specified by the argument promQLQuery, it is replaced by value of the jp1im_TrendData_labels that is set in SID of the configuration information specified by the argument sid and passed to the trend data management service.

promQLQuery

Specify the filter conditions for trend data with PromQL statements.

For details about PromQL expression that can be specified, see 2.7.4(4) About PromQL in the JP1/Integrated Management 3 - Manager Overview and System Design Guide.

starttime

Specifies the start time for fetching trend data in seconds elapsed since January 1, 1970 00:00:00 (UNIX epoch). You cannot specify a time (negative value) before 0:00:00 a.m. on January 1, 1970.

endtime

Specifies the end time for obtaining trend data in seconds elapsed since January 1, 1970 00:00:00 (UNIX epoch). You cannot specify a time (negative value) before 0:00:00 a.m. on January 1, 1970.

step

Specify the interval between getting trend data in seconds.

Return values

If the trend data acquisition is successful, the trend data object containing the trend data information is returned. For details on the format of trend data objects, see 7.2.3(1) Trend Data Object.

If trend data fails to be retrieved, the keys and values stored in the object are shown below.

Key

Value

errorMessage

Error message.

  • If the jp1user argument is invalid, the message KAJY22043-E is set.

  • If the sid argument is invalid, a KAJY62003-E error message is set.

  • If the port number of the Trend Data Management Service fails to be obtained, the message KAJY62004-E is set.

  • If communication with the Trend Data Management Service fails, the message KAJY62000-E is set.

  • If the Trend Data Management Service returns an error, the message KAJY62002-E is set.

  • If the SID of the configuration information managed by the subordinate manager is specified and the connection to the intelligent integrated management infrastructure of the subordinate manager fails, the message KAJY00027-E is set.

  • If the SID of the configuration information managed by the subordinate manager is specified and an error occurs in the processing of the intelligent integrated management infrastructure of the subordinate manager, the message KAJY00029-E is set.

errorMessageId

Returns the ID of the error message.

The method of the user-created plug-in that calls this method determines the error by the presence or absence of the value of the key errorMessageId, and depending on the contents of the value, consider error messages and error handling based on the plug-in specifications.

Output the value of the key errorMessage to the internal log of the plug-in and use it for plug-in failure investigation.

Exception

None