Defining FILE Event Objects
You define FILE Events to monitor file-related conditions, for example if the defined number of files has been transferred via FTP into a directory, or if a file is stable. If they are met, they trigger the actions that you define on the Event Process page. These actions are usually the execution of further objects. FILE Events are in Sleeping status as long as the frequency and time conditions are not met and change to Checking when they are.
You can use the following functions of the Automic scripting language to retrieve relevant data for the Event object:
- For Console, File and Database Events: GET_CONSOLE, GET_EVENT_INFO
- For File Events: GET_FILESYSTEM
You define FILE Event objects on two pages:
-
File Event
-
This is the core of Event objects. You specify here the statements that are processed as soon as the defined conditions are met.
Note that there are agents that do not support all options.
To Define File Event Objects
-
Define the File Event.
Field Description Path Enter the drive, path or signature where the monitored file(s) are located. Depending on the target system, you can indicate files, drives, volumes, paths, Generation Data Groups, and so on.
Allowed wildcard characters: *, ?
Notes:
-
Since * and ? are used as wildcard characters, you cannot use them to specify files that include them in their names.
-
(Windows) The * and ? wildcard characters can be used for file names only and NOT for directories within the path.
-
(Windows) End path specifications with \*
Example: C:\AUTOMIC\*
-
If you indicate one or more volumes, use the prefix VOL=
Example: VOL=ALG*1 supplies information about all volumes that start with ALG and end with 1.
- (z/OS) For Generation Data Groups, use the * wildcard character within brackets. For more information, see GDG Support.
Check Condition The condition that will be controlled:
-
File size
The Agent converts the file size and the specified value into bytes so that both values can be compared.
-
Number of files
-
Used space
For VMS, WINDOWS and UNIX Agents, if you want the system to calculate the used space in the entered path including also the files available in the sub directories, activate the Include Sub-Directories checkbox.
Please, take into account that activating this checkbox may have a negative impact in your system performance.
-
Available space
Available memory or disk space (BS2000)
-
Filesystem space
Free space of volumes (z/OS) or of a drive (Windows)
File Available if you previously selected File size or Number of files. Specify what should be checked in the file:
-
File changed
The Agent checks when the file was created and the last modification timestamp. If the file was created before the event started and the actual file size matches the value specified before, the Agent triggers the action.
-
File size stable
The Agent checks if the file size has changed in the time frame that you define, regardless of when it was created. If the file size has not changed within that time frame, the Agent triggers the action.
Include Sub-Directories Available for VMS, UNIX and Windows agents.
If wildcard characters are used or sub-directories are included in the search, a file can be found several times. Define whether One file must match or if All files must match with the specified conditions.
Activating this option might affect the performance of your system negatively
Comparator Select the operator to be used to evaluate the conditions. Value Specify the value to which the selected check and operator refer. Unit Select the unit with which the value will be measured.
If the target system works with a different unit, it will be converted accordingly.
Select Use Agent specific if the measuring unit that is specified in the target system (such as PAM pages in BS2000) should be used.
This list is only available if relevant.
-
-
Define the event monitoring parameters:
Field Description Frequency Frequency of the interval for verification, that is, how often the Event object should be activated. Take into account that shorter intervals guarantee faster execution but have a negative impact on performance.
-
Once
It is activated only once.
-
Repeatedly
It is activated periodically, depending on the setting you define below.
-
Repeat until first match
It is activated until the specified conditions applies.
Check Frequency Specify when the Event object will be activated:
-
Activate the In intervals of ... minutes to define a periodicity and enter or select the interval.
-
Activate At to define a specific time and enter it.
Some of the settings specified here can be read at runtime. Script elements are used to access the attributes of this object.
First Check Here you further configure when the intervals should begin:
-
Immediately
The Event object becomes active for the first time upon its activation, regardless of the specified time interval.
-
After the first interval
The Event object becomes active for the first time after the expiration of the first time interval.
If start time is later Here you further configure when the event should be activated:
-
Activate immediately
If the Event object starts after the specified time, it becomes active immediately.
-
Wait for the next valid date
If the Event object starts after the specified time, it becomes active with the next valid date considering the calendar and time conditions you specify below.
-
-
Define the Time and Date Conditions.
These conditions are always checked and an event will only be triggered if at least one of them is met or if no condition has been defined here. The current date and time are used as reference. The Time Zone assigned to the event is considered as well. This means that activating an event and specifying a logical time does not make sense.
Time specifications are checked for full minutes, i.e. the ending time 23:59 hours lasts until 23:59:59. Hence, the event can also be triggered in the last 59 seconds.
- Click the first row to activate it and, in the Calendar column select an entry from the dropdown list.
- Select the Calendar Event you want to apply.
-
To edit a row you must first click its checkbox to activate it. You have then the following options:
To add/edit a row you must first click its checkbox to activate it. You have then the following options:
Option Description
Inserts a new row at the bottom of the table
Deletes the row Removes the entry from the list and pastes it to the clipboard. Click Paste to add it to the bottom of the table. Duplicates the entry. Click Paste to add it to the bottom of the table. Activates all rows in the table. -
Switch to the Event Process Page.
Next steps:
Define the Actions that the Event will Trigger
You do this on the Event Process Page.
Execute the Event Object
The execution of an Event object usually triggers the execution of other objects; those objects may in turn trigger the execution of further tasks. In the Process Monitoring perspective on the various lists of Executions related to the Event object, the tasks resulting from these executions are displayed as children of the Event and are flagged with a special tag type, namely !EVNT. This way you can easily check which executions were triggered by a specific Event.
See Monitoring Events for details on how the Event Monitor works as well as Execution Data for information on Execution data.
Event objects can be included in Schedule Objects (JSCH) and thus be executed automatically at predefined times and/or intervals. Likewise, they can be part of workflows (see Workflow Overview).
Of course, you can also manually execute, restart or stop them. For details see Executing Event Objects.
If you want to check the number of times the system checked the Event, go to the Check count section on its Details.
Monitor the Event
Immediately after executing the object you can start monitoring it. Right-click it to select Monitoring and open the pre-filtered list of tasks to display this one. See Monitoring.
In the Process Monitoring perspective you can then follow their progress and access the reports and statistical information associated to them.
Active Events can be canceled (they assume then the Abend/manually canceled status), quitted (they end cleanly with Ended_OK status) or suspended (this keeps the Event active but temporarily disabled).
See Working with Tasks, particularly Stopping and Interrupting.
See also: