Hitachi

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


5.6.1 Event search

Description

Get events which related events to IM management node from the integrated monitoring database.

Specifying an IM management node as a parameter returns a list of events that were issued from the node.

Specifying search conditions as a parameter returns a list of events that match the conditions.

Events cannot be retrieved if the logged-in JP1 user has no permission to view the events. Note that such a case causes no error.

What kind of events you can get depends on the JP1 resource group settings and the event receiver filter settings in JP1/IM - Manager.

Execution permissions
  • JP1_Console_Admin

  • JP1_Console_Operator

  • JP1_Console_User

API version

v1

Format
Request line
POST /application/component/apiVersion/nodes/treeInfo/event httpVersion
Request message body
{
    "sid":"tree-SID-of-the-IM-management-node",
    "filter":"event-search-condition",
    "direction":"direction-of-the-event-search",
    "since":"start-position-of-the-event-search",
    "count":"number-of-events-to-be-obtained",
    "attrs":"list-of-event-attributes-to-be-obtained",
    "statusFilter":"statusFilter",
    "consolidateEvent":"whether-to-return-consolidated-repeated-events",
    "searchCount":"number-of-event-searches"
}
Response message body
{
  "eventData":[
    event-information-object, ...
  ],
  "messageId":"message-ID",
  "message":"message",
  "beginSid":"next-event-SID-at-the-start-position-of-the-JP1-event-search",
  "endSid":"event-SID-at-the-end-position-of-the-JP1-event-search"
}
Parameters
sid

Specify the tree SID of the IM management node as string type.

Obtains the list of events that occurred from the specified IM management nodes. If the parameter is omitted, it is assumed that all systems (_ROOT_AllSystems) is specified. Returns an empty list of events if you omit this parameter when the IM management nodes have not been set up.

filter

Specify the event search condition object, which stores arrays of conditions.

The system searches the integrated monitoring database for events based on the specified event search conditions. For details on the event search object, see 7.2.1(3) Event search condition object.

Narrow down the events of that are the target of the sid parameter using the event search conditions specified the filter parameter.

direction

Specify in which direction the event search proceeds.

  • Into the past: past

  • Into the future: future

Omitting this parameter causes past to be used.

since

Specify the SID of the JP1 event that serves as a starting point for the event search. The API searches for events that occurred either before or after the JP1 event corresponding to the specified SID. Note that the JP1 event corresponding to the specified SID is not included in the search.

If this parameter is omitted, the search will be started from the beginning or end of the integrated monitoring database according to the direction parameter.

For details on the JP1 event SID, see 7.2.1(1) Event information object.

count

Specify the maximum number of events to be retrieved in the range of 1 to 2000. Omitting this parameter causes the maximum number to be set to 2000.

attrs

Specify an array of event attributes that you want to get. The attributes specified in this parameter are retrieved in user-specified order.

Example

"attrs":["B.ID","B.MESSAGE",...]

If this parameter is omitted, all the attributes that can be output by the output of event report functionality and the attributes listed in the table of Event attributes of the consolidation start event in 7.2.1(1) Event information object are retrieved.

For details of the event report functionality, see 4.15.2 Saving event information in the integrated monitoring database (CSV report) in the JP1/Integrated Management 2 - Manager Overview and System Design Guide.

statusFilter

When I perform narrowing of the status of the IM management node only by an applicable event, I appoint a value of the status with sequence of int.

For details of status of IM management node, see 5.8.3 IM management node status acquisition.

Example: If you want to obtain the events of which the statuses are 30 or 40.

"statusFilter":[30,40]

consolidateEvent

Specify whether to return consolidated repeated events when repeated events are consolidated. Omitting this parameter causes the parameter to be set to false. If you do not want repeated events to be returned, specify true.

  • true: If repeated-event display is suppressed with the Intelligent Integrated Management Base, only consolidation start events are returned. Repeated events after the consolidation start event are not returned.

  • false: Repeated events are returned regardless of whether repeated-event display is suppressed with the Intelligent Integrated Management Base.

searchCount

Specify the upper limit for the number of event searches from 0 to 120,000.

Up to 100 events mapped with the IM management node specified by the sid parameter are searched for, starting from the search start position specified by the since parameter in the search direction of the direction parameter. If the number of events specified by the count parameter cannot be retrieved due to a reason such as an event receiver filter, the next 100 events are repeatedly searched for as the target. Specify the upper limit for the number of these repeated event searches.

If the number of searches reaches the upper limit, the search operation is suspended and the list of events retrieved successfully before the search ends is returned. If the parameter is omitted or if the value is set to 0, there will be no upper limit for the number of searches.

Status codes

The following table describes the status codes that are returned as a response to the request:

Status code

Message

Description

200

None

A list of events was retrieved successfully.

KAJY32005-W

A temporary error occurred during the event search.

KAJY32010-W

Event retrieval was suspended because the event search to obtain events reaches the specified upper limit for the number of searches.

400

KAJY32200-E

The request has a parameter with an invalid format.

KAJY32201-E

The event search conditions (the filter parameter) are invalid.

404

KAJY32202-E

The specified node does not exist on the manager.

500

KAJY32000-E

to

KAJY32004-E

KAJY32006-E

An error occurred during the event search process.

For details on the messages, see the manual JP1/Integrated Management 2 - Manager Messages.

Return values

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

No.

Member name

Data type

Description

1

eventData

Object[]

Returns an array of the event information objects that represents a list of retrieved events. For details on the event information object, see 4.2.2(1) Event information object.

If there is no event to be returned, a zero-length array is returned.

2

messageId

string

Returns the message ID of the temporary error message that is generated during an event search. If there is no message to be notified, this information is not returned.

3

message

string

Returns the body of the temporary error message that is generated during an event search. If there is no message to be notified, this information is not returned.

4

beginSid

string

Returns the next JP1 event SID at the start position of the event search. It is the next JP1 event SID in the direction of event retrieval starting from since.

It is omitted if there is no event to be searched for.

5

endSid

string

Returns the JP1 event SID at the end position of the event search. If event search is suspended, the JP1 event SID at the suspended position is returned.

It is omitted if there is no event to be searched for.

Example 1

The following example uses this API to get a list of events that are related to a JP1/AJS job group.

POST /im/api/v1/nodes/treeInfo/event HTTP/1.1
Authorization:Bearer xxxx
Accept-Language: ja
Content-Type: application/json
Accept: application/json
 
{
    "sid": "_ROOT_AllSystems/_SYSTEM_System1/_SYSTEM_SubSystem1/_HOST_host1/_CATEGORY_Job/_SUBCATEGORY_JP1%2FAJS3%20-%20Manager/_OBJECT_ScheduleServ/_OBJECT_jobgroup",
"count": "200",
"attrs": [ "B.ID","E.@JP1IM_DEALT","E.SEVERITY" ]
}
Example 2

The following example uses this API to get a list of events by specifying event search conditions.

Request:
POST /im/api/v1/nodes/treeInfo/event HTTP/1.1
Authorization:Bearer xxxx
Accept-Language: ja
Content-Type: application/json
Accept: application/json
 
{
    "filter": {
        "include": [
            [
            {"key":"E.SEVERITY","ope":"IN","val": ["Error","Warning"] },
             {"key":"B.SOURCESERVER","ope":"IN","val":["host1","host2","host3"]}
            ],
            [
            {"key":"E.SEVERITY","ope":"IN","val": ["Error","Warning","Notice"] },
            {"key":"B.SOURCESERVER","ope":"IN","val":["host4","host5"]}
            ]
        ],
        "exclude": [
            [
                {"key":" E.@JP1IM_DEALT","ope":"IN","val":"1"}
            ]
        ]
    }
}
Response:
HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, max-age=0
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: application/json
 
{
    "eventData": [
    {
        "sid": "_JP1IM_imhost1/_JP1IMSEQNO_697/_JP1IMEVBSEQNO_746",
        "value": [
            "B.ID": "00004107",
            "E.@JP1IM_DEALT": "0",
            "E.SEVERITY": "Error"
    },
    {
        "sid": "_JP1IM_imhost1/_JP1IMSEQNO_698/_JP1IMEVBSEQNO_747",
        "value": [
            "B.ID": "00004104",
            "E.@JP1IM_DEALT": "0",
            "E.SEVERITY": "Error"
    }
    ]
}