4.1.3 Defining a mapping block
A mapping block specifies the correspondences between NNMi incident attributes and JP1 event attributes (mapping conditions). You can specify the following attributes in a mapping block:
-
Message
-
Severity
-
Extended attribute
Specification of mapping blocks is optional.
- Organization of this subsection
(1) Message mapping
You can specify mapping of messages between NNMi incidents and JP1 events. The format of a message in a mapping block is as follows:
messageΔany-message
Δ indicates one or more consecutive spaces or tabs.
If message mapping is omitted, any message in an NNMi incident is mapped as is into a message in the JP1 event.
(a) Editing messages
A message cannot contain a space, tab, CR, LF, or percent sign. However, you can represent each of these items with a two-digit hexadecimal number in the format %ASCII-code, as shown below:
-
Space: %20
-
Tab: %09
-
CR: %0d
-
LF: %0a
-
%: %25
Characters other than the above can also be expressed in the format %ASCII-code (2-digit hexadecimal number).
You can display the attribute value corresponding to an attribute name in a message by embedding the attribute name of the NNMi incident in the message. To display an attribute value, enclose the attribute name in dollar signs ($) and then embed it in the message.
For example, if you want to display the severity and the source node name in addition to the message in the format [severity]message(source-node-name), specify as follows:
message [$SEVERITY$]$FORMATTED_MESSAGE$($SRC_NODE_NAME$)
The following table lists the attribute names of the NNMi incidents that can be embedded in messages.
Attribute |
Attribute name |
---|---|
Source |
SRC_NAME |
Source Type |
SRC_TYPE |
Source Node |
SRC_NODE_NAME |
Name |
NAME |
Severity#1 |
SEVERITY |
Priority#1 |
PRIORITY |
Lifecycle State#1 |
LIFECYCLE_STATE |
Assigned To |
ASSIGNED_TO |
Category#1 |
CATEGORY |
Family#1 |
FAMILY |
Origin#1 |
ORIGIN |
Correlation Nature#1 |
NATURE |
Duplicate Count |
DUPLICATE_COUNT |
Message |
FORMATTED_MESSAGE |
Notes |
NOTES |
RCA Active |
RCA_ACTIVE |
Origin Occurrence Time |
ORIGIN_OCCUR_TIME |
First Occurrence Time |
FIRST_OCCUR_TIME |
Last Occurrence Time |
LAST_OCCUR_TIME |
Created |
CREATED |
Last Update Time |
MODIFIED |
Number of Custom Attributes |
CIANUM |
Custom Attribute Name |
CIANAME_$n#2 |
Custom Attribute Type |
CIATYPE_$n#2 |
Custom Attribute Value |
CIAVALUE_$n#2 |
(2) Severity mapping
You can specify mapping of severities between NNMi incidents and JP1 events. The format of a severity in the mapping block is as follows:
severityΔseverity-of-NNMi-incidentΔtoΔseverity-of-JP1-event
Δ indicates one or more consecutive spaces or tabs.
For example, if you want to map the severity CRITICAL of NNMi incidents to the severity Emergency of JP1 events, specify as follows:
severity CRITICAL to Emergency
If severity mapping is omitted, the severities are mapped as shown in the following table.
NNMi incident |
JP1 event |
---|---|
-- |
Emergency |
CRITICAL |
Alert |
MAJOR |
Critical |
-- |
Error |
MINOR |
Warning |
WARNING |
Notice |
NORMAL |
Information |
-- |
Debug |
- Reference:
-
-
The severity values are all case sensitive.
-
The same NNMi incident severity value cannot be specified more than once. However, you can map multiple NNMi incident severity values into the same JP1 event severity value.
-
(3) Extended attribute mapping
If you want to add attributes specific to JP1/IM - EG for NNMi (extended attributes), you can specify mapping of extended attributes.
For details about the attributes of the JP1 events that are obtained by converting NNMi incidents, see 8.2 JP1 events obtained by converting NNMi incidents. You can add a maximum of 70 attributes whose Mapping column is Y in the attributes listed in Table 8-1 Attributes of JP1 events obtained by converting NNMi incidents.
The following shows the format of extended attributes in the mapping block:
attributeΔextended-attribute-name-1,Δextended-attribute-name-2,Δ...
Δ indicates one or more consecutive spaces or tabs.
For example, if you want to add the priority NNMI_PRIORITY as an extended attribute, specify as follows:
attribute NNMI_PRIORITY
If you omit mapping of extended attributes, extended attributes cannot be added.
(a) Total size of extended attributes
The maximum total size of the extended attributes that can be added is 10,000 bytes. Any extended attributes beyond byte 10,000 are not mapped. Therefore, select the extended attributes to be added so that their total size does not exceed 10,000 bytes.
You can use the following formula to determine the size of one extended attribute:
Size of extended attribute = Length of attribute name in characters + 1 + size of attribute value
For details about the sizes of attribute values, see Table 8-1 Attributes of JP1 events obtained by converting NNMi incidents. We recommend that you estimate the size of attribute values based on the maximum size. If the size is fixed or the maximum size is known, use that size.
- Example:
-
The size of the priority (NNMI_PRIORITY) extended attribute is determined as follows:
269 = 13 (length of attribute name in characters) + 1 + 255 (maximum size of attribute value)
For example, if it is known that only those NNMi incidents whose priority attribute values are the highest (com.hp.nms.incident.priority.Top) are to be converted into JP1 events, you can use 32 as the size of the attribute value.
(b) Checking the result of extended attribute mapping
You can determine the result of extended attribute mapping by checking the attribute value of the NNMI_EM_RESULT extended attribute. The following explains the attribute values of the NNMI_EM_RESULT extended attribute:
- ALL
-
Indicates that all the specified attributes have been added as JP1 event extended attributes. The result is also shown as ALL when there are no attributes to be added (extended attribute mapping has been omitted).
- numeric-value
-
Indicates the number of attributes that have been added as JP1 event extended attributes. For example, if you issued a JP1 event with 10 attributes specified in the mapping block, and the attribute value of the NNMI_EM_RESULT extended attribute is 8, then the last two attributes specified in the mapping block were not added.