Hitachi

JP1 Version 12 JP1/Base User's Guide


3.4.5 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:

Table 3‒6: Regular expressions available by default

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:

#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 JP1/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:

Table 3‒7: Regular expressions available when extended

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:

  1. 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\].

  2. 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.