7.1. Introduction to event handlers

7.1.1. General presentation

The most common event handlers are the ones sending events to a specific destination. Each destination is configured using an event handler. Each event handler has its own configuration and is used for sending the event in a certain format or according to certain rules.

For example, you can configure one event handler to store the logs in automatically rotated files and another one to send the logs to Windows Events or a remote Syslog server.

The server can be configured with an arbitrary number of handlers and you can configure multiple handlers of the same type.

For more information on using event handlers, please see the usage instructions page.

7.1.2. Adding a new event handler via Local Manager

A new event handler can be added or changed via Local Manager below. Options will differ depending on which event handler is used.


7.1.3. Adding a new event handler via text configuration

Adding a new event handler is done by creating a new section inside the configuration file. The name of the section should be prefixed with event-handlers/ and followed by the handler's UUID.

The handler's UUID can be any unique string used to identify the event handler. Once defined, the UUID should not be changed.

For more information about UUIDs, please see the dedicated UUID documentation.

For example, to add a new event handler of type http called Critical Errors to be triggered when events with id 1345 or id 2456 and by user mary or john occur, you could use this configuration example:

name = Critical Errors
description = Send critical errors as HTTP notifications using JSON.
type = http
http_content_type = json

timeout = 30

target = 1345, 2456
usernames = mary, john