Open topic with navigation

# Configure an Event Handler

To configure an event handler, follow these steps.

To configure an event handler

1. Stop the connector.
2. Open the connector’s configuration file in a text editor.

3. Use the `OnStart`, `OnFinish`, or `OnError` parameter to specify the name of a section in the configuration file that contains event handler settings for the corresponding event.

   - To run an event handler for all actions, set these parameters in the `[Actions]` section. For example:

         [Actions]
         OnStart=NormalEvents
         OnFinish=NormalEvents
         OnError=ErrorEvents

   - To run an event handler for specific actions, use the action name as a section in the configuration file. The following example runs an event handler when the Fetch action starts and finishes successfully:

         [Fetch]
         OnStart=NormalEvents
         OnFinish=NormalEvents

4. Create a new section in the configuration file to contain the settings for your event handler. You must name the section using the name you specified with the `OnStart`, `OnFinish`, or `OnError` parameter.

5. In the new section, set the following parameters.

   `LibraryName` | (Required) The name of the library to use as the event handler. You can write your own event handler, or use one of the internal event handlers: To write event data to a text file, set this parameter to `TextFileHandler`, and then set the `FilePath` parameter to specify the path of the file. To send event data to a URL, set this parameter to `HttpHandler`, and then use the HTTP event handler parameters to specify the URL, proxy server settings, credentials and so on. To run a Lua script, set this parameter to `LuaHandler`, and then set the `LuaScript` parameter to specify the path to the Lua script.

   For example:

       [NormalEvents]
       LibraryName=TextFileHandler
       FilePath=./events.txt

       [ErrorEvents]
       LibraryName=LuaHandler
       LuaScript=./error.lua

6. Save and close the configuration file.

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close We welcome your comments! To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm