J.4 Converting JP1/SES events into JP1 events
A JP1/SES event only contains a basic set of attributes (such as the event ID and message). It does not contain an extended set of attributes (such as the severity, user name, product name, and object type).
To display an event in the JP1/IM Event Console window, you must specify the extended attributes in that event. To do this, you can use the extended attribute mapping settings file to add extended attributes (such as severity) to the JP1/SES event. To convert a JP1/SES event into a JP1 event, you can add extended attributes to the event. This is called JP1/SES event conversion.
The following figure provides an overview of JP1/SES event conversion.
|
- Organization of this subsection
(1) JP1/SES event conversion procedure
This subsection describes how to add extended attributes to a JP1/SES event being converted to a JP1 event. If necessary, you can add a message with the extended attributes.
The following steps describe how to convert events.
-
Determine the event to be converted, and the extended attributes and message to be added.
-
Create an action definition file.
Create the following definition file on the computer where JP1/Base is installed:
-
Extended attribute mapping settings file
-
-
Restart the event service (JP1/Base)
If JP1/IM is running, shut it down and restart JP1/Base. Then, restart JP1/IM, if necessary.
(a) Determining the event to be converted, and the extended attributes and message to be added
First, determine which JP1/SES event you want to convert. You can use an event ID or an issuing server name to filter JP1/SES events to reduce the number of events. Filtering only allows a JP1/SES event with a specific event ID, or an event issued by a specific server, to be converted into a JP1 event.
Next, determine the extended attributes and message to be added to the JP1/SES event. To use JP1/IM to monitor an event, the extended attribute SEVERITY must be added. For other extended attributes and messages, determine which extended attributes and messages are necessary for JP1/IM to monitor events, and then add those attributes and messages. Guidelines for adding extended attributes are provided in the manual Job Management Partner 1/Base Function Reference.
(b) Creating an action definition file
To add extended attributes and a message to a JP1/SES event, create the extended attribute mapping settings file.
■ Items to be defined
In the extended attribute mapping settings file, specify an event filer to determine the JP1/SES event to convert, and the extended attribute and message to add to the event.
■ Storage location
Create the extended attribute mapping settings file in the following directory on the computer where JP1/Base is installed.
- In Windows:
directory-specified-in-event-server-index\sesmap\
This directory is represented in the default event server index as follows:
installation-folder\conf\event\servers\default\sesmap\
- In UNIX:
directory-specified-in-event-server-index/sesmap/
This directory is represented in the default event server index as follows:
/etc/opt/jp1base/conf/event/servers/default/sesmap/
The sesmap directory is not created during standard installation. You first need to create the sesmap directory, and then create a text file with a file name (in the format shown below) directly under the directory:
company-name_product-name_map.conf
The PRODUCT_NAME can be SERIES NAME_PRODUCT NAME. For the file name, we recommend replacing forward slashes (/) (part of the value specified for PRODUCT_NAME when issuing a JP1 event) with underscores (_). Because hitachi is used as the standard name for the supplied file, we recommend using a company name other than hitachi as the company-name.
More than one extended attribute mapping settings file can be created. When multiple extended attribute mapping settings files with different names are created directly under the sesmap directory, those files are used to convert the JP1/SES events they define. If multiple extended attribute mapping settings files are created, the contents of these files are parsed in ascending order of file name.
- Note
-
Only store definition files in the sesmap directory.
If a backup file or model file exists in the directory, the file can be used to perform conversion.
■ Format
An extended attribute mapping settings file is a collection of mapping setting blocks. The format for a mapping setting block is as follows:
# Comment map [filter-block] [message] [extended-attribute-1] [extended-attribute-2] ... [extended-attribute-n] end-map # Comment
The comment line starts with a hash mark (#) and does not contain any linefeed characters. A comment can be inserted between mapping setting blocks, but cannot be inserted in a block.
map and end-map declare the start and end of a mapping setting block.
The other components of a mapping setting block are described below.
• filter-block
In the filter block, specify the filter used to determine the JP1/SES event to be converted into a JP1 event. The file format is as follows:
filter Event-filter end-filter
If no filter block exists, all JP1/SES events are converted. For details, see Event filter syntax in 16. Definition Files.
• message
Specify a message to be added to the JP1/SES event as event information. The format is as follows:
B.MESSAGE delimiter message-text
The text between the delimiter following the B.MESSAGE and the linefeed at the end of the line is added as a message. If no message text is specified, no message is added.
If a JP1/SES event already contains a message, the message is replaced with the message text specified by this parameter. However, if the total size of the message text to be added and the original event information exceeds 1,024 bytes, the message is not added.
• extended-attribute
Specify one or more extended attributes to be added to event information as necessary. The format is as follows:
E.extended-attribute-name delimiter extended-attribute-value
After E., specify the name of the extended attribute to be added. The character string between the delimiter and the linefeed at the end of the line is treated as the value of the extended attribute. This value cannot be empty (NULL) and it cannot contain any linefeeds.
To add multiple extended attributes to a single JP1/SES event, repeat this line for each of the extended attributes. A mapping setting block cannot contain extended attributes with the same name. The maximum number of extended attributes that can be added to a JP1/SES event is 100, and the total size for all extended attributes can be no more than 10,000 bytes. If either of these limits is exceed, the entire mapping setting block is ignored.
■ Notes
-
The size of a record in the extended attribute settings file can be no more than 1,024 bytes.
-
You can omit filter blocks, messages, and extended attributes. If you specify these items, specify them in the order shown. If the order is wrong, or if a block other than an extended attribute block appears two or more times, the entire mapping setting block is invalid.
-
If a filter defined in a filter block contains Japanese characters, JP1/SES events whose encoding differs from that of the filter block will not be converted.
-
The extended attribute mapping settings file does not support exclusion conditions. Do not specify an exclusion condition for a filter defined in the filter block.
■ Definition examples
• Single mapping
In this example, for JP1/SES events sent to the local host from JP1/SES running on a host named raysol, the extended attribute SEVERITY (specified Information) and the message Information Message are added to a JP1/SES event with an event ID of 111.
A text editor is used to create an extended attribute mapping settings file named company_sample_map.conf. The extended attribute mapping settings files contain the following definitions:
|
• Multiple mappings
An extended attribute mapping settings file can contain multiple mapping definitions.
For example, in addition to the definition shown in Single mapping, another extended attribute SEVERITY (specified to Warning) can be added to a JP1/SES event with an event ID of 222. In this case, the mapping is defined as follows:
|
If an extended attribute mapping settings file contains multiple mapping definitions, they definitions are parsed in the order that they appear in the file.