evtdef
Imports/exports a generic event provider XML definition file where you can add and modify custom event types. You can then use the sendevent command to send these events to the event processing server. See also Defining custom events.
Syntax
evtdef -U | -V
evtdef [connection parameters] dumpdef file-path
evtdef [connection parameters] loaddef file-path
Arguments
- -U
- Displays command usage information and exits.
- -V
- Displays the command version and exits.
- connection parameters
- If you are using evtdef from the master domain manager, the connection parameters were
configured at installation and do not need to be supplied, unless you do not want to use the default
values. If you are using evtdef from the command line client on another workstation, the connection parameters might be supplied by one or more of these methods:
- Stored in the localopts file
- Stored in the useropts file
- Supplied to the command in a parameter file
- Supplied to the command as part of the command string
For an overview of these options, see Setting up options for using the user interfaces.
For full details of the configuration parameters see Configuring command-line client access authentication .
- dumpdef file-path
- Downloads the generic event provider XML file. The file is downloaded
with the file name and path you provide in file-path. You can
edit the file to add your own custom event types. The name of the generic event provider supplied with the product is
GenericEventPlugIn
. You can change this name by acting on thename
tag of theeventPlugin
keyword.Important: You must use this name as the value of:- The
source
keyword of the sendevent command - The
eventProvider
keyword in the definition of the event rules triggered by these custom events.
- The
- loaddef file-path
- Uploads the modified generic event provider XML file from the file and path you provide in file-path.
Comments
- eventDefinitions.xsd
- common.xsd
schemas
subdirectory
of the HCL Workload Automation installation
directory.<?xml version="1.0" encoding="UTF-8"?>
<eventDefinitions
xmlns="http://www.ibm.com/xmlns/prod/tws/1.0/event-management/plugins/events"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/tws/1.0/event-management/
plugins/events/eventDefinitions.xsd">
eventPlugin>
<complexName displayName="Custom event" name="GenericEventPlugIn"/>
<scopes>
<scope name="Generic">
<scopedef text="{Param1} on {Workstation}"/>
</scope>
</scopes>
<event baseAliasName="genericEvt" scope="Generic">
<complexName displayName="Generic event" name="Event1"/>
<displayDescription>The event is sent when the specified expression is
matched.</displayDescription>
<property type="string" required="true" wildcardAllowed="true"
multipleFilters="true" minlength="1">
<complexName displayName="Parameter 1" name="Param1"/>
<displayDescription>The value of parameter 1</displayDescription>
</property>
<property type="string" required="true" wildcardAllowed="false"
multipleFilters="false" minlength="1>
<complexName displayName="Workstation" name="Workstation"/>
<displayDescription>The workstation for which the event is
generated.</displayDescription>
</property>
</property>
</event>
</eventPlugin>
</eventDefinitions>
Property type | Add into XML event file as shown |
---|---|
boolean |
|
date |
|
datetime |
|
datetimeutc |
|
duration |
|
fileSize |
|
nonnegativeinteger |
|
numeric |
|
percentage |
|
string | or
|
You
can change the values of all the property attributes, with the exception
of type
, to fit your requirements.
The properties so defined are converted into input fields after the event definition is uploaded and opened in the Dynamic Workload Console.
<eventPlugin>...</eventPlugin>
sections. For
example:<?xml version="1.0" encoding="UTF-8"?>
<eventDefinitions
xmlns="http://www.ibm.com/xmlns/prod/tws/1.0/event-management/plugins/events"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/tws/1.0/event-management/
plugins/events/eventDefinitions.xsd">
<eventPlugin>
<complexName displayName="Custom event" name="GenericEventPlugIn"/>
<scopes>
<scope name="Art042StockQuantity">
<scopedef text="{Art042pieces}"/>
</scope>
</scopes>
<event baseAliasName="genericEvt" scope="Generic">
<complexName displayName="Stock of article 042 reaches minimum level"
name="art042qty"/>
<displayDescription>The event is sent when the number of art.42
items on stock reaches
minimum level.</displayDescription>
<property type="numeric" required="true" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="Art042 items on stock" name="art042items"/>
<displayDescription>The number of art042 items left</displayDescription>
</property>
</event>
<event baseAliasName="Hard drive saturation" scope="Generic">
<complexName displayName="Hard drive saturation" name="HDSatEvent"/>
<displayDescription>displayDescription>The event is sent when the percentage field
reaches the warning level.</displayDescription>
<property type="percentage" required="true" wildcardAllowed="false"
multipleFilters="true" minlength="1>
<complexName displayName="Percentage Full" name="PercentFull"/>
<displayDescription>The percentage of total disk space used</displayDescription>
</property>
<property type="string" required="true" wildcardAllowed="false"
multipleFilters="false" minlength="1>
<complexName displayName="Workstation" name="Workstation"/>
<displayDescription>The workstation where the hard drive is installed
</displayDescription>
</property>
</event>
</eventPlugin>
</eventDefinitions>
Examples
- Download the generic event provider XML file as file
c:\custom\myevents.xml
evtdef dumpdef c:\custom\myevents.xml
- Edit the file to add your own event type definitions.
- When finished, you upload the generic event provider XML file
from file
c:\custom\myevents.xml
evtdef loaddef c:\custom\myevents.xml