Job Management Partner 1/Integrated Management - Manager Command and Definition File Reference
Format
[#automated-action-definition-file-version] [DESC_VERSION=version-information] [#automated-action-status-monitoring-parameter] cmn [sta true|false] end-cmn [#automated-action-definition-parameter] act action-name [prm parameter-group] [cmt comment] eid event-ID cnd event-conditions end-cnd [usr user-name] [hst execution-host-name|group-name] [cmd action]|[rul] [var environment-variable-file-name] [det suppress-period] [ret delay-monitoring-period] end-act
File
actdef.conf (automated action definition file)
actdef.conf.model (model file for the automated action definition file)
Storage directory
- In Windows
Console-path\conf\action\ shared-folder\jp1cons\conf\action\ (logical host)
- In UNIX
/etc/opt/jp1cons/conf/action/ shared-directory/jp1cons/conf/action/ (logical host)
This file defines conditions for executing actions by the automated action function of JP1/IM and the commands to be executed as the actions. To use the language encoding that is used by JP1/IM - Manager, specify this file.
The maximum size of an automated action definition file is 22 megabytes (23,068,672 bytes).
The automated action function automatically executes a specified command on the basis of the definition specified in this file when a JP1 event satisfying specified conditions is received.
Each line of action definition information is called a parameter. There are three types of parameters in an automated action definition file:
- Automated action definition file version
Defines the format version of the automated action definition file.
- Automated action status monitoring parameter (common block)
Specify the cmn parameter in the common block to define whether the status of automated actions is to be monitored.
- Automated action definition parameters (action block)
Specify parameters, such as prm and cmt, in the action block to define conditions for executing an action and the command to be executed as the action.
You must specify the automated action definition file version and the automated action status monitoring parameter before the automated action definition parameters. If you specify the automated action definition file version and/or the automated action status monitoring parameter after the automated action definition parameters, the specified definition is ignored.
If you specify the automated action definition file version or the automated action status monitoring parameter more than once, the first definition specified takes effect and subsequent definitions are ignored.
- Definition specification
- Use the space or the tab to separate the words in a parameter.
- Spaces or tabs preceding the first parameter name on a line are ignored.
- A line beginning with hash mark (#) is regarded as a comment except when the hash mark (#) is preceded by a character string.
- Use lower-case letters to specify the parameter names in action definitions. A specified parameter name that contains upper-case letters is treated as being invalid and results in a definition error.
- Action priority
- If a received JP1 event satisfies the execution conditions in multiple automated action definitions, only the automated action that has the highest priority is executed (for each parameter group discussed below). The automated action priority order is determined by the following rule:
- The first action specified in the automated action definition file (in GUI, the first action displayed in the Action Parameter Definitions) takes precedence over the other actions.
- You can change the action priority order in the common definition. For details about the priority order of automated actions, see 5.3.2 Precedence of execution conditions in the Job Management Partner 1/Integrated Management - Manager Overview and System Design Guide.
- Parameter groups and AND conditions
- Each automated action definition parameter belongs to a parameter group. A parameter group is a unit for checking the conditions for executing an automated action. Use of parameter groups enables you to specify complex conditions, such as when multiple actions are to be executed for a single JP1 event or when an action is to be executed only when multiple conditions are satisfied.
- When a single JP1 event arrives at the manager host of JP1/IM, the automated action definition parameters and execution conditions are compared for each parameter group in order of priority. When execution conditions that are satisfied are found, only the automated action definition parameter that has the highest priority is executed for each parameter group.
- If you specify an ampersand (&) in a parameter group, an AND condition with the automated action definition parameter defined on the preceding line is created. When automated action definition parameters are specified in an AND condition, the corresponding action is executed when all the conditions are satisfied.
- Checking the specified information
- Use the jcamakea command to check the information specified in the definition file.
When the definitions are applied
The definition of an automated action takes effect when the definition is applied by clicking the Apply button in the Action Parameter Definitions window in JP1/IM - View when JP1/IM - Manager is started, as well as when the jcachange command is executed to re-load the definition.
Information that is specified (automated action definition file version)
This subsection describes the information to be specified as the automated action definition file version.
- DESC_VERSION=version-information
- Defines the format version of the automated action definition file. Specify this definition on the first line of the automated action definition file (the first line in the file excluding null lines and comment lines). If this information is specified on a line other than the first line, a definition error results.
Table 2-7 Automated action definition file format version information
Version information Description 1 Not used. The value 2 is assumed for reading the file. 2 Automated action definition file version is 08-01 or later. 3 Automated action definition file version is 09-00. - If this parameter is omitted or 1 is specified, the value 2 is assumed for reading the file. When the Apply button is clicked in the Action Parameter Definitions window in JP1/IM - View, the value 2 is set.
- If a value other than 1, 2, or 3 is specified in this parameter, an error is output to the integrated trace log and the value 2 is assumed as the version information for reading the file.
- In such a case, the Action Parameter Definitions window cannot be displayed in JP1/IM - View. To change the version information, directly edit the definition file.
- Because the format of an old automated action definition file version is compatible with the automated action definition file format for version 08-01 or later, the format for version 08-01 or later is assumed for reading the file.
- If this parameter is specified on a line that is subsequent to a line containing an automated action definition parameter, the Action Parameter Definitions window can no longer be displayed in JP1/IM - View.
- Use the jcamakea command to check the contents of the automated action definition file.
Information that is specified (automated action status monitoring parameter)
This subsection describes the information to be specified in the automated action status monitoring parameter.
- cmn to end-cmn
- These are the start and end parameters for the block that specifies a parameter that is applicable to all action definitions. The portion between cmn and end-cmn is called a common block. This block must be specified before the automated action definition parameters. Specify this parameter only once in the automated action definition file. Specification of this block is optional. If this block is omitted, false is assumed for the sta parameter.
- [sta true|false]
- Specifies whether the action status is to be monitored.
- Specify either true or false. To monitor the action status, specify true. To not monitor the action status, specify false. The default is false.
Information that is specified (automated action definition parameters)
This subsection describes each item that is specified in the automated action definition parameters.
- act action-name to end-act
- Specifies the start and end parameters of an automated action definition. There is no limit to the number of actions that can be defined between act and end-act; however, at least one action must be specified. The portion between act action-name and end-act is called an action block.
- After act, specify an action name, expressed using from 1 to 50 bytes of characters. The permitted characters are all characters other than the control characters (from 0x00 to 0x1F and from 0x7F to 0x9F).
- Each action name must be unique among the action names specified in all the action blocks. The parameters that can be specified in the action block are as follows:
- prm, cmt, eid, cnd to end-cnd, usr, hst, cmd, rul, var, det, ret
- prm parameter-group
- Specifies a number for the parameter group. If this parameter is omitted, 0 is assumed.
- You can specify a single numeric digit (from 0 to 9) or the ampersand (&). If you specify a numeric digit, you cannot omit the action name. If you specify an ampersand (&), this parameter becomes part of an AND condition with the immediately preceding action block, which means that the automated action definition parameter in this action block belongs to the same parameter group as the immediately preceding action block. When an ampersand (&) is specified, the action name cannot be specified.
- Following an action block for which the ampersand is not specified, you can specify a maximum of 9 action blocks as members of an AND condition (for a total of 10 action blocks including the first action block).
- Within the same parameter group, the first action block specified (in the GUI, the top action block displayed in the Action Parameter Definitions window) has precedence over the other action blocks. When a JP1 event arrives at the manager, it is matched against the event conditions in the action block for each parameter group in the order of priority. When event conditions are found that match the JP1 event, the action in the action block that has the highest priority is executed for the parameter group and no more matching is performed for the action blocks that follow the executed action block. Events are matched in ascending order of parameter groups. For details about the priority order of automated actions, see 5.3.2 Precedence of execution conditions in the Job Management Partner 1/Integrated Management - Manager Overview and System Design Guide.
- cmt comment
- Specifies a comment about the action block. This parameter is optional. Specify a comment using from 1 to 1,040 bytes of characters. All characters are permitted. If a comment exceeds 1,040 bytes in length, the portion in excess of 1,040 bytes is deleted.
- eid event-ID
- Specifies the event ID for the action conditions. This parameter is mandatory and can be specified only once.
- An event ID consists of a base part and an extension part. Express each part of an event ID as a string of from 1 to 8 hexadecimal characters, and separate the base part from the extension part with a colon (:). An event ID is not case sensitive. The extension part can be omitted. To specify any event ID, use an asterisk (*). When an asterisk is specified, all events become subject to the action. If JP1 events occur frequently, a large number of actions will be implemented, in which case execution may be delayed. When you specify an asterisk, you should narrow down the applicable events by using other conditions (such as a message, basic event information, detailed event information, and extended event information).
- The following shows an example:
Example: Specify event ID A: eid a eid A eid 0000000a eid 0000000A eid 0000000A:0 eid 0000000A:00000000- Example: Specify any event ID:
eid *
- cnd event-conditions to end-cnd
- Specifies the start and end parameters of the block that specifies event conditions for executing an action. Specification of an event condition block is mandatory. Specify only one event condition block within an action block. You can specify from 0 to 256 event conditions in an event condition block.
- event-conditions
- Specifies the event conditions in the following format:
attribute-name comparison-keyword operand [ operand]...- Note that a line consisting of only spaces or tabs is ignored during processing.
- attribute-name
- Specifies the name of an attribute that you want to compare. To specify a basic attribute, place B. immediately before the name. To specify an extended attribute (common information or user-specific information), place E. immediately before the name. Attribute names are case sensitive.
- comparison-keyword
- Specifies one of BEGIN (begins with), IN (matches), NOTIN (does not match), SUBSTR (includes), NOTSUBSTR (does not include), or REGEX (regular expression) as the comparison keyword. The comparison keyword is case sensitive.
- operand
- Specifies a character string as the value that is to be compared with the attribute value by the specified comparison keyword. Operands are case sensitive.
- To specify multiple operands, separate them with one or more consecutive spaces or a tab. The OR condition is applied to the specified operands. Note that when a regular expression is specified, only one operand can be specified.
- To use a space, tab, linefeed code (CR or LF), or % as part of an operand value, you must specify a value shown below:
No. Value to be used What to specify 1 Tab (0x09) %09 2 Space (0x20) %20 3 % (0x25) %25 4 Linefeed code LF (0x0a) %0a 5 Linefeed code CR (0x0d) %0d - During maximum value checking for the definition format, %20 and %25 are each treated as a single character. The following shows an example of defining ID matches 100 and 200, which selects multiple operands:
B.IDIN
100
200
- Legend:
: Space (0x20)
- You can specify a maximum of 4,096 bytes of operands per event condition and per event condition block (total length in bytes of all operands that are specified in the event condition block).
- Basic event information
- If you specify B.BASIC as the attribute name, you can set the same conditions as for basic event information in the automated action definition file (for conversion).
- When you specify B.BASIC as the attribute name, you must specify REGEX as the comparison keyword.
- You can specify the operands in the same format as is used for basic event information in the automated action definition file (for conversion). Note that to use a space, tab, linefeed code (CR or LR), or percent sign (%), specify %. Specify a forward slash (/) as /; there is no need to specify it as \/.
- Detailed event information
- If you specify B.DETAIL as the attribute name, you can set the same conditions as for detailed event information in the automated action definition file (for conversion).
- When you specify B.DETAIL as the attribute name, you must specify REGEX as the comparison keyword.
- You can specify the operands in the same format as is used for detailed event information in the automated action definition file (for conversion). Note that to use a space, tab, linefeed code (CR or LR), or percent sign (%), specify %. Specify a forward slash (/) as /; there is no need to specify it as \/.
- The following table lists and describes the attribute names, comparison keywords, and operands that can be specified in an event condition.
Table 2-8 Attribute names, comparison keywords, and operands that can be specified in an event condition
No. Item Attribute name Comparison keywords Operand 1 Event ID B.ID
- Match
- Does not match
- Regular expression
Specifies an event ID.
If the basic part or extended part of an event ID is a value that consists of fewer than 8 characters, leading 0s are added to obtain a string of 8 characters.
- A maximum of 100 event IDs can be specified. However, if a regular expression is used, only one event ID is allowed.
- In the case of Match or Does not match, the event ID is not case sensitive.
- The permitted range is from 0 to 7FFFFFFF.
- In the case of a regular expression, the event ID of an event to be compared is treated as having the following format:
When the extended part of the event ID is 0:
basic-part-of-event-ID (8-digit hexadecimal value consisting of upper-case letters and numbers)
When the extended part of the event ID is not 0:
basic-part-of-event-ID (8-digit hexadecimal value consisting of upper-case letters and numbers):extended-part-of-event-ID (8-digit hexadecimal value consisting of upper-case letters and numbers)
2 Source process ID B.PROCESSID
- Match
- Does not match
- Regular expression
Specifies the process ID of the application program that issues the event.
- A maximum of 100 source process IDs can be specified. However, if a regular expression is used, only one source process ID is allowed.
- The permitted value range is from -2,147,483,648 to 2,147,483,647.
3 Registered time B.TIME Regular expression Specifies the time the JP1 event was registered into the event database at the source host.
- A regular expression in the format YYYYMMDDhhmmss must be used.
4 Arrived time B.ARRIVEDTIME Regular expression Specifies the time the JP1 event arrived at the event database at the source host.
- A regular expression in the format YYYYMMDDhhmmss must be used.
5 Source user ID B.USERID
- Match
- Does not match
- Regular expression
Specifies the user ID (numeric value) of the source process.
- A maximum of 100 source user IDs can be specified. However, if a regular expression is used, only one source user ID is allowed.
- The permitted value range is from -2,147,483,648 to 2,147,483,647.
6 Source group ID B.GROUPID
- Match
- Does not match
- Regular expression
Specifies the group ID (numeric value) of the source process.
- A maximum of 100 source group IDs can be specified. However, if a regular expression is used, only one source user ID is allowed.
- The permitted value range is from -2,147,483,648 to 2,147,483,647.
7 Source user name B.USERNAME
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the user name of the source process.
- A maximum of 100 source user names can be specified. However, if a regular expression is used, only one source user name is allowed.
8 Source group name B.GROUPNAME
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the group name of the source process.
- A maximum of 100 source group names can be specified. However, if a regular expression is used, only one source group name is allowed.
9 Source IP address B.SOURCEIPADDR
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the IP address of the event-issuing server.
- A maximum of 100 source IP addresses can be specified. However, if a regular expression is used, only one source IP address is allowed.
10 Event-issuing server name B.SOURCESERVER
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the host name of the host (event server name) where the JP1 event occurred.
- A maximum of 100 event-issuing server names can be specified. However, if a regular expression is used, only one event-issuing server name is allowed.
11 Message B.MESSAGE
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the message for a basic attribute of the event.
- A maximum of 100 messages can be specified. However, if a regular expression is used, only one message is allowed.
12 Detailed information B.DETAIL
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies detailed information for a basic attribute of the event.
- A maximum of 100 detailed information items can be specified. However, if a regular expression is used, only one detailed information item is allowed.
- If binary data is set in the detailed information for the JP1 event, the detailed information is treated as being the null character "" (0 bytes) for performing comparison.
- Available for compatibility purposes.
13 Reason for registration B.REASON
- Match
- Does not match
- Regular expression
Specifies a reason for registration.
- A maximum of 100 reasons for registration can be specified. However, if a regular expression is used, only one reason for registration is allowed.
14 Start time E.START_TIME Regular expression Specifies the execution start or restart time.
- This item cannot be specified more than once.
- Specify the absolute time in seconds using a regular expression.
15 End time E.END_TIME Regular expression Specifies the execution end time.
- This item cannot be specified more than once.
- Specify the absolute time in seconds using a regular expression.
16 Product name E.PRODUCT_NAME
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the name of the product that issued the JP1 event.
- A maximum of 100 product names can be specified. However, if a regular expression is used, only one product name is allowed.
17 Object type E.OBJECT_TYPE
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the type of object.
- A maximum of 100 object types can be specified. However, if a regular expression is used, only one object type is allowed.
18 Object name E.OBJECT_NAME
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the object name of the JP1 event.
- A maximum of 100 object names can be specified. However, if a regular expression is used, only one object name is allowed.
19 Root object type E.ROOT_OBJECT_TYPE
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the root object type of the JP1 event.
- A maximum of 100 root object types can be specified. However, if a regular expression is used, only one root object type is allowed.
20 Root object name E.ROOT_OBJECT_NAME
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the root object name of the JP1 event.
- A maximum of 100 root object names can be specified. However, if a regular expression is used, only one root object name is allowed.
21 Object ID E.OBJECT_ID
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the object ID of the JP1 event.
- A maximum of 100 object IDs can be specified. However, if a regular expression is used, only one object ID is allowed.
22 Occurrence E.OCCURRENCE
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the occurrence of the JP1 event.
- A maximum of 100 occurrences can be specified. However, if a regular expression is used, only one occurrence is allowed.
23 User name E.USER_NAME
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the user name of the user who issued the JP1 event.
- A maximum of 100 user names can be specified. However, if a regular expression is used, only one user name allowed.
24 Termination code E.RESULT_CODE
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the termination code.
- A maximum of 100 termination codes can be specified. However, if a regular expression is used, only one termination code is allowed.
25 Severity E.SEVERITY
- Match
- Regular expression
Specifies the severity of the JP1 event.
- The following severity levels can be specified: Emergency, Alert, Critical, Error, Warning, Notice, Information, or Debug.
- Multiple severity values can be specified. However, if a regular expression is used, only one severity value is allowed.
26 Basic event information B.BASIC Regular expression You can specify basic event information for compatibility with version 8 or earlier. 27 Program-specific extended attribute --
- Match
- Does not match
- Is contained
- Is not contained
- First characters
- Regular expression
Specifies the attribute name of a program-specific extended attribute.
- You can specify a name with a maximum length of 32 bytes that begins with an upper-case letter and consists of upper-case letters, numeric characters, and the underscore (_).
- A maximum of 100 extended attribute names can be specified. However, if a regular expression is used, only one extended attribute name is allowed.
- Legend:
- --: None
- usr user-name
- Specifies the user name of the JP1 user who executes the action. The usr parameter is optional. If this parameter is omitted, the system assumes the JP1 user name specified as the default action execution user in the definition of the automated action execution environment. If the default action execution user is also omitted, jp1admin is assumed.
- Express the user name using from 1 to 31 bytes of characters. A user name cannot contain the space character. You can specify a variable for the user name. You specify a variable when you want to set information contained in the received JP1 event as the user name.
- You can set event information for the user name.
- When the action is executed, the JP1 user specified here is mapped to the OS user at the execution host that will execute the command, according to the JP1/Base definition. In UNIX, the shell environment of the mapped OS user is used for execution. Note that this parameter cannot be specified together with the rul parameter.
- hst execution-host-name|group-name
- Specifies the name of the host or host group that is to execute the action. For a host name, specify a name set as a managed host in the system configuration definition. The hst parameter is optional. If it is omitted, the local host is assumed.
- Express the execution host name or host group name using from 1 to 255 bytes of characters. The execution host name or host group name cannot contain the space character. You can specify a variable for the execution host name or host group name. You specify a variable when you want to set information contained in the received JP1 event as the execution host name or host group name. For example, to execute the action on the host that issues the event, specify $EVHOST.
- You can set event information for the execution host name or host group name.
- Note that this parameter cannot be specified together with the rul parameter.
- cmd action
- Specifies the command that is to be executed as the action. For details about the specifiable commands, see 5. Command Execution by Automated Action in the Job Management Partner 1/Integrated Management - Manager Overview and System Design Guide.
- The cmd parameter is optional. If this parameter is omitted, no action is taken even when conditions for action execution are satisfied.
- Note that if any of the following parameters is omitted, omitting the cmd parameter results in a definition error:
- usr, var, hst, det, ret
- The cmd parameter cannot be specified more than once. Specify the parameter using from 1 to 4,096 bytes of characters. Any tabs or spaces preceding the action are deleted, but spaces following the action are not deleted.
- This parameter cannot be specified together with the rul parameter.
- You can set event information for the action.
- You can use a variable to specify information contained in the received JP1 event. For example, if the execution host is UNIX, the following specification sets the name of the host that issued the JP1 event in the HOSTNAME environment variable:
HOSTNAME="$EVHOST" action xxx_BASIC="$EVBASE" xxx_MESSAGE="$EVMSG" action- Notes about the length of an action command
- The maximum length of a command that can be executed as an action is 4,096 bytes including the information obtained after converting variables to be used in the action definition (such as $EVMSG). If the command length exceeds 4,096 bytes, the execution status becomes Fail, in which case the command is not executed. In such a case, the message KAVB4421-W Cannot execute action because command line is too long is displayed in the Message field in the Action Log Details window.
- The length of a command that can be executed as an action also depends on the system where JP1/IM - Manager and JP1/Base are running.
- If any of the hosts on the automated action execution route (including the source manager host and target execution host) runs JP1/IM - Manager or JP1/Base version 6 or version 7, the maximum length of a command must not exceed 1,024 bytes. For notes about the length of a command, see 11.4(2) Notes in the Job Management Partner 1/Integrated Management - Manager Overview and System Design Guide.
- Notes about codes that cannot be recognized as characters in an action
- If an action contains a code that cannot be recognized as a character, the action may not be executed by the shell at the execution host or may result in an error when the action attempts to execute. In such a case, the action results in terminated status, not an execution failure. Even though there might be no invalid code in the definition file, an invalid code might be generated when a variable used in the action definition is replaced with the actual value. For details about the correct specification of variables in an action definition, consult the documentation for the products that issue action-related events.
- rul
- Specifies that a rule startup request to JP1/IM - RL is to be set. This parameter cannot be specified together with the var, cmd, usr, or hst parameter.
- var environment-variable-file-name
- Specifies the full path name of the environment variable file that specifies environment variables for the command that is to be executed as the action. This parameter is optional. If this parameter is omitted, it is assumed that there is no environment variable file. For details about the format of an environment variable file, see Environment variable file.
- Express the environment variable file name using from 1 to 255 bytes of characters. You can set event information for the environment variable file name. You can specify a variable for the environment variable file name. You specify a variable when you want to set information contained in the received JP1 event as the environment variable file name. For example, to set the JP1 event extended attribute named ENVFILE as the environment variable file name, specify $EV"ENVFILE".
- Note that this parameter cannot be specified together with the rul parameter. Spaces before and after the environment variable file name are not deleted. Only one tab or one space character following var is deleted.
- det suppress-period
- Specifies a period during which action execution is to be suppressed. The action for the action conditions is suppressed if it would otherwise occur during the period specified in this parameter. This parameter is optional. If this parameter is omitted, the action is not suppressed. The permitted value range for the suppression period is from 1 to 3,600 (seconds). This parameter cannot be specified when you have specified & for the parameter group. In the case of AND conditions, specify the suppression period in the first automated action definition parameter that is defined for the AND conditions.
- ret delay-monitoring-period
- Specifies a period during which monitoring for the action execution is performed. If the amount of time specified in this parameter expires before a command control action termination message is received from the execution host after a JP1 event arrived at JP1/Base at the manager, a delay of action is reported by using a method such as JP1 event issuance or command execution. This parameter is optional. If this parameter is omitted, no monitoring for action delay is performed. The permitted value range for the delay monitoring period is from 1 to 86,400 (seconds).
- #comment-statement
- A line beginning with a hash mark (#) is treated as a comment. Note that if you set an action definition from JP1/IM - View, comment lines with the # mark are deleted.
Variables that can be used in the action definition
In a definition of automated action definition parameters, you can use variables in the usr, var, hst, and cmd parameters to specify information contained in the JP1 events.
When the action is executed, the variables are replaced with the actual information in the JP1 event.
To specify a variable in an automated action definition parameter, use a format such as $EVID.
The following table lists the describes the available variables.
Table 2-9 Variables that can be used in action definitions
Type of information Variable name Description Information contained in the basic attributes of JP1 events EVBASE Entire basic event information EVID Event ID (basic-code:extended-code) EVDATE Event generation date (YYYY/MM/DD) EVTIME Event generation time (hh:mm:ss) EVPID Event source process ID EVUSRID User ID of the event source process EVGRPID Group ID of the event source process EVUSR Event source user name EVGRP Event source group name EVHOST Event source host name EVIPADDR Event source IP address EVSEQNO Serial number EVARVDATE Event arrival date (YYYY/MM/DD) EVARVTIME Event arrival time (hh:mm:ss) EVSRCNO Serial number at the event source EVMSG Entire message text EVDETAIL Entire detailed event information Information contained in the extended attributes of JP1 events EVSEV Severities in extended event information (Emergency, Alert, Critical, Error, Warning, Notice, Information, Debug) EV"extended-attribute-name" Any extended attribute Other ACTHOST Manager host name at the action request source EVENV1 to EVENV9 Data obtained by specifying "( )" in a regular expression in the specification of an action execution condition (applicable only when an extended regular expression is used at the manager host) The value of the variable for an invalid item is NULL. Depending on the type of JP1 event, an action may not be executable or may result in an error if it is executed with a missing variable or with a code in the attribute information that cannot be recognized as a character. Consult the documentation for the products that issue JP1 events beforehand for correct specification of the information.
Notes about specifying variables
- If you specify a character, such as an alphanumeric character or an underscore (_), immediately after the variable name, the variable will not be converted correctly. In such a case, enclose the variable name in curly brackets ({ }), as shown in the examples below. These examples assume that 100:0 is specified as the event ID ($EVID) and ABC is specified as the extended attribute EX ($EV"EX").
Examples:
action-definitioninformation-after-conversion $EVID abc
100:0 abc $EVIDabc
$EVIDabc (in Windows), none (in UNIX) ${EVID}abc
100:0abc $EVID_abc
$EVID_abc (in Windows), none (in UNIX) ${EVID}_abc
100:0_abc $EV"EX" abc
ABC abc $EV"EX"abc
ABCabc
- If the source character information contains any of the control characters shown below, the control character is converted to a space (0x20).
Control characters that are converted to a space: 0x01 to 0x1F (excluding tab (0x09)), 0x7F
For example, if the message acquired by specifying $EVMSG contains a linefeed code (0x0A), the linefeed code (0x0A) is converted to the space (0x20).
Example: If the action echo $EVMSG is set and the character string "line-1 0x0A line-2", which contains a linefeed code, is received as the message for the event, the command "echo line-1line-2" is executed as the action.
- In UNIX, the final expansion depends on the interpretation by the shell. If the expanded data contains a character that has a special meaning in the shell, such as *, it is replaced by the corresponding data. To prevent such characters from being converted, enclose the entire variable in double-quotation marks ("), such as "$EVMSG".
Regular expressions in an action definition
This subsection describes how to use regular expressions to specify attributes of JP1 events (message text, basic attributes, and detailed information) in an event monitoring condition of an automated action definition.
The supported regular expressions depend on the OS. The regular expressions supported by Windows and UNIX are described below.
If you share the same action definitions among different OSs, specify conditions using expressions that are supported by all the OSs because interpretation of regular expressions depends on the OS. Regular expressions supported by all OSs are presented in G. Regular Expressions in the Job Management Partner 1/Integrated Management - Manager Overview and System Design Guide. Consult this information to determine the regular expressions that can be used.
Regular expressions for the Windows version
For the Windows version, you can set the supported regular expressions to either JP1-specific regular expressions or extended regular expressions. The default is extended regular expressions. For details about how to specify JP1-specific regular expressions, see Automated action environment definition file (action.conf.update) in 2. Definition Files.
Regular expressions for the UNIX version
For the UNIX version, use the extended regular expressions. For details about the supported regular expressions, see the OS-provided regexp(5).
Example definition
This example executes Act.exe and \test\sample.exe when the two events shown below occur (the example does not monitor the action status).
Table 2-10 Example definitions in the automated action definition file
Event ID Severity Object name 555 Unspecified Unspecified 100 Critical, Error /ACTION DESC_VERSION=3 cmn sta false end-cmn act action-1 prm 0 eid 555 cnd end-cnd cmd Act.exe end-act act prm & eid 100 cnd E.SEVERITY IN Critical Error E.OBJECT_NAME IN /ACTION end-cnd cmd \test\sample.exe end-act
All Rights Reserved. Copyright (C) 2009, Hitachi, Ltd.