Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
alarm_handler(3)	   Erlang Module Definition	      alarm_handler(3)

       alarm_handler - An Alarm	Handling Process

       The alarm handler process is a gen_event	event manager process that re-
       ceives alarms in	the system. This process is not	intended to be a  com-
       plete  alarm  handler.  It defines a place to which alarms can be sent.
       One simple event	handler	is installed in	the alarm handler at  startup,
       but users are encouraged	to write and install their own handlers.

       The  simple event handler sends all alarms as info reports to the error
       logger, and saves all in	a list.	This list can be passed	to a  user-de-
       fined  event  handler,  which can be installed later. The list can grow
       large if	many alarms are	generated. This	is a good reason to install  a
       better user-defined handler.

       Functions are provided to set and clear alarms. The alarm format	is de-
       fined by	the user. For example, an event	handler	for SNMP  can  be  de-
       fined, together with an alarm Management	Information Base (MIB).

       The alarm handler is part of the	SASL application.

       When  writing  new  event handlers for the alarm	handler, the following
       events must be handled:

	 {set_alarm, {AlarmId, AlarmDescr}}:
	   This	event is generated by alarm_handler:set_alarm({AlarmId,	 Alar-

	 {clear_alarm, AlarmId}:
	   This	event is generated by alarm_handler:clear_alarm(AlarmId).

       The  default  simple  handler is	called alarm_handler and it can	be ex-
       changed	by  calling  gen_event:swap_handler/3  as  gen_event:swap_han-
       dler(alarm_handler, {alarm_handler, swap}, {NewHandler, Args}). NewHan-
       dler:init({Args,	{alarm_handler,	Alarms}}) is called. For more details,
       see gen_event(3)	in STDLIB.

       clear_alarm(AlarmId) -> void()


		 AlarmId = term()

	      Sends event clear_alarm to all event handlers.

	      When receiving this event, the default simple handler clears the
	      latest received alarm with id AlarmId.

       get_alarms() -> [alarm()]

	      Returns a	list of	all active alarms. This	function can  only  be
	      used when	the simple handler is installed.



		 alarm() = {AlarmId, AlarmDescription}
		 AlarmId = term()
		 AlarmDescription = term()

	      Sends event set_alarm to all event handlers.

	      When receiving this event, the default simple handler stores the
	      alarm. AlarmId identifies	the alarm and is used when  the	 alarm
	      is cleared.

       error_logger(3),	gen_event(3)

Ericsson AB			   sasl	3.3		      alarm_handler(3)


Want to link to this manual page? Use this URL:

home | help