3.4.3 Extending regular expressions to be used
JP1/Base supports regular expressions in filter conditions for forwarding JP1 events to higher-level hosts or converting Windows event logs and application logs to JP1 events.
Initially, you can use the following regular expressions:
OS |
Supported regular expressions |
---|---|
Windows |
JP1-specific regular expressions |
UNIX |
Basic regular expressions provided by each OS |
The following programs and definition files for JP1/Base support regular expressions:
-
Event filters specified in the forwarding settings file (forward)
-
Filters specified in the action definition file for event log traps (ntevent.conf) and the action definition file for log file trapping
-
Filter file used for the jevexport command
-
Event filters specified in the local action execution definition file
-
Search for JP1 events from JP1/IM - View#1
-
Event filters for the function for acquiring JP1 events from the JP1/Base event server (JevGetOpen)#2
-
Event filters for the extended attributes mapping settings file
#1: When you search for JP1 events from JP1/IM - View, the settings of regular expressions for JP1/Base on the searched host apply.
#2: For details, see the manual Job Management Partner 1/Base Function Reference.
In version 07-00 and later of JP1/Base, you can extend the default regular expressions. By extending regular expressions, you can use common regular expressions for Windows and UNIX. The following table lists available regular expressions:
OS |
Supported regular expressions |
---|---|
Windows |
Complies with the syntax for XPG4 extended regular expressions. |
UNIX |
Complies with the syntax for XPG4 extended regular expressions. The syntax differs depending on the OS. For details, see the syntax of each regular expression (regexp or regex). |
For the syntax and examples for frequently used regular expressions, see F. Syntax of Regular Expressions. Use them as reference for using regular expressions.
- Organization of this subsection
(1) Setup
The following describes the procedure for extending regular expressions. If you are using a cluster system, perform the following for both primary and secondary nodes.
To extend regular expressions:
-
Create a definition file with any name.
Enter the following lines in the definition file:
[JP1_DEFAULT\JP1BASE\] "REGEXP"="EXTENDED"
When using JP1/Base in a cluster system, specify the logical host name for JP1_DEFAULT in [JP1_DEFAULT\JP1BASE\].
-
Execute the jbssetcnf command.
jbssetcnf definition-file-name
The settings are reflected in the common definition information.
You can restore the default regular expressions using the same procedure. In that case, enter the following in the definition file:
[JP1_DEFAULT\JP1BASE\] "REGEXP"=""
(2) When the setting takes effect
The following table shows when the setting of regular expressions takes effect for JP1/Base facilities that support them:
Function |
When the setting takes effect |
---|---|
Forwarding JP1 events |
When the event service is started. |
jevexport command |
When the jevexport command is executed. |
Local action |
When the local action function is started. |
Search for events from JP1/IM - View |
When the event service is started on the target event server. |
Function for acquiring JP1 events from the JP1/Base event server (JevGetOpen) |
When the event service is started on the target event server. |
Event log trapping |
When the event-log trapping service is started. Complies with the setting on the physical host. |
Log file trapping |
When the log-file trap management service (or daemon) is started. Complies with the setting on the physical host. |
Converting JP1/SES events |
When the event service is started. |