cancel
Showing results for 
Search instead for 
Did you mean: 

Feature Brief: Event Handling in Traffic Manager

Traffic Manager's sophisticated 'Event Handling' system allows an administrator to configure precisely what actions Traffic Manager should take when a wide range of events occur.  The range of events covers internal changes (configuration modified, SSL certificate timing out), external changes (back-end server failure, service-level class falling outside parameters) and traffic-initiated events (trafficscript rule raising an event due to certain user traffic).

Traffic Manager can be configured to perform any of a range of actions when an event is raised - log a message, raise an SNMP trap or syslog alert, send an email or even run a custom script:

event1.png

The Event Handler configuration maps groups of events to user-defined actions


Configuration

 

Traffic Manager already contains one built-in event handler that causes all events to be written to the global Event Log. This built-in handler and its "Log all Events" action can not be deleted, but you can add additional actions if required. You can add additional event handlers, such as the handler illustrated above that sends an email when there is a problem with a license key.

 

Components of an Event Handler

 

Each Event Handler is triggered by events of a particular type. When an event that matches the Event Type occurs, the Event Handler will invoke the Action it is configured to perform:

 

  • An Event Type is a set of events that can trigger an Event Handler. Traffic Manager includes a number of predefined event types, such as 'Service Failed' or 'Any critical problem', so that you can easily create simple event handlers, such as 'email the administrator if any part of the infrastructure fails'.  You can create new event types, and even create new events that you can raise from TrafficScript or Java Extensions.
  • There are a number of built-in Actions, such as 'send an SNMP trap', and you can create additional actions using either the SOAP alerting interface or scripts and programs that you can upload to Traffic Manager.

 

Event formats

 

Information about the event is provided to the action that it triggered in the following format:

 

LEVEL (tab) [section] (tab) primary tag (tab) [tags (tab)]* text

 

LEVEL may be one of 'INFO' (for example, a configuration file was modified), 'WARNING' (for example, a node in a pool failed), 'SERIOUS' (for example, all of the nodes in a pool have failed) or 'FATAL' (a catastrophic error that prevents the traffic manager from functioning).

 

For example, if you stop a virtual server called 'Server1' the following event will be raised:

 

INFO (tab) vservers/Server1 (tab) vsstop (tab) Virtual server stopped

 

The first two components indicate that the event is an informational message about the virtual server "Server1". The primary tag, vsstop, defines what has happened to that virtual server. There are no additional tags because this event does not affect any other aspects of the configuration. Finally there is a human-readable description of the event that occurred.

 

You can find a full list of the events that may be raised in the Traffic Manager UI:

 

event2.png

Create a set of events: there are 100's of event that can be trapped and acted upon...

 

Raising events from TrafficScript

 

You can use the TrafficScript function 'event.emit()' to raise an event.  For example, you may wish to log certain requests to the main Event Log, and this is an appropriate way to do so.

 

Read more

 

Version history
Revision #:
2 of 2
Last update:
‎06-24-2019 06:27:AM
Updated by:
 
Labels (1)
Contributors