Custom Events

Custom events are a unique type of event to initiate events from scripts.

This type of event is different from other event types because it controls event generation as opposed to other events that trigger events by a certain occurrence.

Custom events are used to generate an event whenever the API function monitor_custom_event() is called from the PHP script.

Description:

This event type enables the generation of an event on occurrences that are not necessarily built-in events (error and performance issues). Custom events are used whenever you decide that it is significant to generate an event in a certain situation. Each event type is given a name for easy identification ($class).

Function Usage:

monitor_custom_event(string $class, string $text[, integer $severe, mixed $user_data])

Parameters:

Aggregation takes place for these events when two events occur in the same place and have the same $class $text $sever(ity)

Note:

Action Rules defined for these events should be set to "send to URL" rather than "sending by e-mail" as there is only one definition for these events and event reports sent to a URL can be easily forwarded elsewhere. This is to prevent the overloading of e-mail. If we use the e-mail action, for every custom event, e-mail will be sent, and there can be many classes of custom events. However, if the URL action is used, a script can be used to identify the event’s class and different behaviors can be implemented according to class.

Return to Event Triggers