Custom Events

Custom events are a unique type of event that is provided for Zend Platform users in order to initiate events from their scripts.

This type of event is different than other event types in that it allows controlling event generation as opposed to the other events that are triggered 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 Zend Platform 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 ($type).

 

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 Choosing and Defining Alert Rules