Handling an Expired Event - Windows

Handling an Expired Event in Windows

In this example, a demand-driven UEM Server installed on a UNIX system watches for the creation of a file called uemtest.dat in the /uem files directory.

Note

The space that precedes the path name specified in the -filespec option is necessary to accommodate parsing requirements for command options in Windows (see the UEM Manager FILE_SPECIFICATION option).

A relative inactive date / time instructs the demand-driven Server to monitor the event for one (1) minute. If the UEM Server detects the file, and the file completes within that time, UEM sets the event occurrence to the triggered state. Since the command options contain no event handler information for a triggered occurrence, the UEM Server simply renames the file (by default). UEM Server then makes the event inactive, and ends.

If the UEM Server detects the file, but the file does not complete within 60 seconds, UEM sets the occurrence to the rejected state. Since the command options contain no event handler information for a rejected occurrence, the UEM Server leaves the file as-is and takes no further action.

If the UEM Server does not detect the presence of uemtest.dat before the inactive time elapses, it sets the event to the expired state. When this happens, the UEM Server executes the command specified by the -cmd parameter of the -expired option. In this example, UEM executes the 'ls -alR /uem files' command.


Note

In this example, the -expired option is followed by the -options option, which redirects the output of the "ls -alR '/uemfiles'" command to a file in uemuser's home directory called uemtest.log.


uem -host uemhost -event_type file 
-userid uemuser -pwd uemusers_password
-filespec " /uem files/uemtest.dat"
-inact_date_time +1 
-expired -cmd "ls -alR '/uem files'" -options ">uemtest.log 2>&1"

Command Line Options

The command line options used in this example are:

Option

Description

-host

List of one or more hosts upon which a command may run.

-event_type

Type of event to monitor.

-userid

ID of a remote user account that the UEM Server uses to establish the security context in which event monitoring is performed.

-pwd

Password associated with -userid.

-filespec

Name or pattern of the file whose creation should be detected and tracked for completion.

-inact_date_time

Date and time at which the state of the monitored event should be made inactive.

-expired

Event state that, when encountered, will result in the execution of the associated event handler.

-cmd

Complete path to an application file or remote script that should be executed on behalf of the event handler.

-options

Values that are passed as command line arguments to a particular handler specified for a given EVENT_STATE.

Components

Universal Event Monitor Manager for Windows

Universal Event Monitor Server for UNIX