Using event_handler.exe CL utility, you can manage event handlers - objects which perform a particular action when triggered by a certain event in Parallels Plesk Panel logic.
This utility performs the following tasks:
Location
%plesk_cli%
Usage
event_handler.exe <command> [<handler_id>] [
<option_1> [<param>]
[<option_2> [<param>]]
… [<option_N> [<param>]]
Example
The following command creates the event handler for the "IP address created" action that triggers the email_ip.bat script if an IP address is added. The handler priority is set to 50.
>event_handler.exe --create -command email_ip.bat -priority 50 -user psaadm -event 5
Commands
Command |
Parameter |
Description |
Example |
||
|---|---|---|---|---|---|
|
|
Creates an event handler. Requires |
To create the event handler send_ip (with priority 50) that triggers the email_ip.bat script if an IP address is added: >event_handler.exe --create -command email_ip.bat -priority 50 -user psaadm -event 5 or >event_handler.exe -c -command email_ip.bat -priority 50 -user psaadm -event 5 |
||
|
|
Updates event handler settings. Requires |
To change the priority of event handler with ID 1 : >event_handler.exe --update 1 -user jdoe -priority 12 or >event_handler.exe -u 1 -user jdoe -priority 12 |
||
|
|
Removes an event handler. |
To remove the event handler with ID 1: >event_handler.exe --delete 1 or >event_handler.exe -d 1 |
||
|
|
Provides information about existing handlers and their settings. |
To list event handlers: >event_handler.exe --list or >event_handler.exe -l |
||
|
|
Lists events that can trigger event handlers. Each record includes event ID and description. |
To view the available events: >event_handler.exe --list-events or >event_handler.exe -le |
||
|
|
Lists users on behalf of which scripts defined in event handler settings ( |
To list users: >event_handler.exe --list-users or >event_handler.exe -lu |
||
|
|
Displays help on the utility use. |
To view help on the use of this utility: >event_handler.exe --help or >event_handler.exe -h |
||
Options
Note: These options are used with --update and --create operations only.
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Specifies the login name of a Parallels Plesk Panel user on behalf of which scripts/files defined in event handler settings are executed. Note: Login name of Parallels Plesk Panel Administrator is "Plesk Administrator". |
To run scripts of the event handler with ID 1 on behalf of John: >event_handler.exe --update 1 -user John |
|
|
Value that determines the importance of an event handler relative to other event handlers. Lowest priority - 0. Highest priority - 100. |
To set the priority of the handler with ID 1 and user jdoe to 75: >event_handler.exe --update 1 -user jdoe -priority 75 |
|
|
Specifies one of the following:
This code/file is executed on triggering a particular event handler. Use "\" symbol to escape quotes within commands. |
To update the event handler command: >event_handler.exe --update 1 -user jdoe -command ipconfig.exe |
|
|
Defines ID of the event that triggers a particular event handler. Use |
To set the event ID of the event handler (with ID 2) to 17: >event_handler.exe --update 2 -event 17 -user root |