Creating an event rule

About this task

Use an event rule to specify a predefined set of actions in response to events that occur on the nodes whereHCL Workload Automation runs. When one or more defined events occurs, you can specify which actions must be performed.

To create an event rule definition, perform the following steps:

Procedure

  1. Make sure you have the required authorizations granted as Dashboard Application Services Hub user, and in the HCL Workload Automation security file. For more information about security settings, see Event management configuration.
  2. From the navigation toolbar, click Administration >Workload Design> Create Event Rules.
  3. In the Engine field, specify the engine (this must be either the master domain manager or a node installed as backup master domain manager but not necessarily belonging to the master domain) where you want to run the event rule and click Go. Only after you have selected an engine connection, is the remainder of the panel displayed. If you have only one engine defined, it is displayed by default and the whole panel is displayed. Each time you create or modify an event rule, the corresponding object in the database is automatically locked. To release an object when you close the panel, click Close or the close button close button. You can unlock an event rule that you own by using the Unlock command. After closing the current rule, click New if you want to create a new rule without exiting the panel.
    Note: When you change the engine connection, the available events and actions are also changed and the list of actions and events you had previously selected is reset. When you save your changes or select a different tab, a warning message is issued to inform you of the reset.
    The Event Rule Editor panel displays the following main sections relating to:
    • General Information
    • Events
    • Actions
    Click the header bar of each section to minimize or expand it.
  4. In the General Information section, enter the required information. All mandatory fields have a yellow background and are marked by an asterisk.
    Note: Every time you modify and save any of these settings, the event rule (if not in Draft status) is newly deployed, and all possible events that were collected before the new deployment are ignored.
    Rule name
    Enter a name for the rule definition. It is a mandatory field with a maximum length of 40 characters. Blanks and special characters are not supported, except for minus (-) and underscore (_) characters. If you enter invalid characters, the field becomes red and the rule saving fails with an error.
    Description
    A generic descriptive text for the rule, with a maximum length of 120 characters.
    Draft
    When an event rule is in Draft status, it is neither deployed nor activated. When the event rule is not in Draft status, it is eligible to be deployed (automatically or manually, according to your deployment policy) and activated. As a result, actions are started whenever all the defined events take place, within the specified validity period. When you change a rule status into Draft or Not Draft, the rule goes respectively into Deactivation Pending or Activation Pending internal status.
    Use the following options to specify time settings for the rule. The rule is active in the specified time zone, within the specified validity period during the days and hours defined.
    Time zone
    Select a time zone from the list. It is the time zone according to which the rule is active (regardless of the engine time zone). If no time zone is specified, the engine time zone is used by default.
    Valid from...Valid to
    Enter the time period during which the rule is valid. If the conditions specified in the rule are satisfied within this time period, the defined actions are run. You can also specify only one value, leaving the other field blank. Blank fields are considered as infinite.
    Daily start/Daily end
    It indicates the hours during which the rule is active, every day during the validity period specified. You can specify only one value, leaving the other field blank. The value of a blank field is considered midnight. You can also enter time values that cross midnight. For example, you can specify: a start time of 7 pm and an end time of 6 am. In this case the rule is active 24 hours a day, except from 7 pm to 6 am everyday, for all the validity period.
  5. In the Events section, select the events you want to monitor:
    1. Each item of the list displayed on the left pane represents a category of events. Click an event category to view all the events belonging to it.
    2. Click an event to automatically add it as a new box in the event section on the right pane. Within each of the boxes representing an event, click:
      The information icon
      To open a new window listing the event properties and details.
      The closing icon
      To remove the event from the list.
      left arrowright arrow
      The left or the right arrow at the bottom of the box to change the order in which the events occur. This is important when you define, within the event rule, a sequence of events.
    3. In the Properties section, specify the event properties.

      The following list describes all the categories of events and their properties.

      HCL Workload Automation object related events
      All the events relating to scheduling objects such as jobs, job streams, workstations, and prompts. This type of event is described in more detail in Workload Scheduler plan events.
      Note: Any change performed on a workstation referenced in a rule is not reported in the rule. For example if you modify, update, or delete a workstation that is referenced in a rule, the rule ignores the change and continues to consider the workstation as it was when it was included in the rule.
      File monitoring events
      Events relating to changes to files and logs.

      File monitoring events are not supported on IBM i systems.

      This type of event is described in more detail in File monitor .

      Application monitoring events
      Events relating to HCL Workload Automation processes, file system, and message box. Application monitoring events are not supported on IBM® i systems.

      This type of event is described in more detail in Application Monitor .

      SAP related events
      These events are available only if you have installed HCL Workload Automation for Applications and they are generated by external SAP systems. This type of event is described in more detail in SAP Monitor.
      Data set monitoring
      These events are available only if you are using the agent for z/OS on HCL Workload Automation This type of event is described in more detail in Data Set Monitoring.
      Generic events
      Events used to manage custom events sent by external applications. You can write an XML file to define a custom event. A schema is provided to validate your XML, as well as a basic event template that you can use as a starting point. For more information, see the schemas for generic events. Events of this category are:
      • Changes in a resource of the operating system, such as processes and memory
      • Email received

      Start of changeYou can also decide to have the HCL environment loaded when you run this plug-in. To enable the environment loading, set the er load option in the localopts file to yes. For more information, see Localopts details End of change

    4. In the Events toolbar, choose an icon to specify the relationship between the events. The corresponding response actions are started only when the events take place according to this relationship. Click:
      Single event selection
      To specify one single event. Select this icon if you want a response action to start whenever the specified event occurs within the defined time period.
      Events collected not in sequence
      To specify a set of events, regardless of the sequence in which they occur. Select this icon if you want a response action to start if all the specified events occur, regardless of the order, within the defined time period.
      Events selected in sequence
      To specify various events in sequence. Select this icon if you want a response action to start if all the specified events occur in sequence, within the defined time period.
    5. Optionally, in the event toolbar, you can specify a Timeout period. This is a further condition that can be set for the rule, only if you selected a set or sequence of two or more events. When you set the timeout option, the specified period is calculated starting from the first event that occurs; if all the remaining events occur within the specified timeout, the response actions are started. If the timeout period expires before all the specified events have taken place, the defined timeout actions start.
    6. Optionally, in the Correlate events on: section, you can select some common properties.

      These properties are common to the events selected. You can use them to create a correlation to further identify the events to monitor. The properties common to the selected events are automatically detected and listed in the right hand part of the event section. Select the properties you want to use for event correlation.

      For example, if you want to receive an email every time a workstation remains unlinked for more than 10 minutes, you can correlate the following settings:
      Event 1
      Whatever workstation is unlinked.
      Event 2
      Whatever workstation is linked.
      Event correlation
      Start the action only if the property workstation_name is the same in Event 1 and Event 2.
      Timeout
      The two events must take place within 10 minutes of each other.
      Action
      Send an email to the administrator.
  6. In the Actions section:
    1. Select the Actions tab. The number displayed in this tab, if any, represents the actions that have already been defined.
    2. In the left pane of this section, select the actions you want to start. Click an action to automatically add it to the action section on the right. Within each of the boxes representing an action click:
      the information icon
      In the new panel that lists the action properties. To see an explanation about the action and its properties, hover with the cursor over the fields.
      the closing icon
      To remove the action from the list.
    3. In the Properties section, specify the action properties. The following list describes all the actions and their properties:
      Operational actions
      Actions that cause a change in the status of one or more HCL Workload Automation objects. Actions in this category include:
      • Submitting jobs or job streams
      • Submitting ad hoc jobs
      • Replying to a prompt

      This type of action is described in more detail in IBM Workload Scheduler actions.

      • Adding an application occurrence (job stream) to the current plan on IBM Workload Scheduler for z/OS® in HCL Workload Automation-IBM Workload Scheduler for z/OS end-to-end scheduling configurations.

      This type of action is described in more detail in IBM Workload Scheduler for z/OS actions.

      Notification actions
      Actions such as:
      Generic actions
      Actions performed by running a command. This type of action is described in more detail in Generic action plug-in.
      When defining the action properties, you can:
      • Click Variable to associate the property to one or more variable values. At run time these values are displayed as properties associated to the selected action.
      • You can click Lookup to select jobs, job streams, and workstations defined in the database only for HCL Workload Automation and IBM Workload Scheduler for z/OS Actions,
    4. Optionally, select Timeout actions to define a further set of actions to start if the timeout period expires before all the specified events are performed. The number displayed in this tab, if any, represents the actions that have already been defined.

Results

After you have defined events and actions, you can clear the Draft check box at the top of the panel and save the rule. The rule definition is then ready to be deployed and remains active according to its validity period, or until you disable it by marking it as Draft.