Next Topic

Previous Topic

Book Contents

Sample Action Event Definitions

Sending Email to a Static Recipient

<action-item enabled="true">

<name>Email Joe</name>

<type>regular-email</type>

<target>joe@nowhere.com</target>

<send-from>dge</send-from>

<on-demand>true</on-demand>

</action-item>

The web application sends a request to the DGE with all the required information. If the request processor does not know how to process the action item of type=regular-email, it sends back a failure code, otherwise the requested action is performed and a success/failure response is sent back to the web application. In absence of a "timeout" value, a default value of 60 seconds is enforced.

Sending Email to a Recipient Defined by User Input

<action-item enabled="true">

<name>Email An Admin</name>

<type>compact-email</type>

<input name="admin_email"

caption="Admin's Email"

type="text" size="15"

default="someuser@company.com"

required="true"/>

<target>${admin_email}</target>

<send-from>bve</send-from>

<timeout>30</timeout>

<on-demand>true</on-demand>

</action-item>

The user is presented with a text box requesting the 'Admin's Email'. Multiple emails can be provided as comma separated values.

Running a Command Line Script with a Password

<action-item enabled="true">

<name>Reboot Cisco Router</name>

<type>script</type>

<input name="enable_pass"

caption="Enable Password"

type="password" size="15"

required="true"/>

<target>rebootRouter.sh</target>

<parameters>

fixedLoginPassword ${enable_pass}

</parameters>

<send-from>dge</send-from>

<on-demand>true</on-demand>

</action-item>

Passing Parameters to a New Browser Window

<action-item enabled="true">

<name>Circuit Database</name>

<type>url</type>

<target>http://db.Kaseya.com/</target>

<parameters>

name=${device_name}&ip=${device_address}

</parameters>

<send-from>bve</send-from>

<on-demand>true</on-demand>

</action-item>

The specified parameters are passed to the URL with a "?" prefix.