LAMA - Log and Alarm Manager overview page @author Serge Aleynikov @copyright 2003 Serge Aleynikov @version {@vsn} $Rev: 359 $ $LastChangedDate: 2006-01-11 10:28:26 -0500 (Wed, 11 Jan 2006) $ @title LAMA - Log and Alarm Manager Overview @doc This application implements LAMA - Log and Alarm Manager.

Contents

  1. Features
  2. Configuration Options
  3. Programming Macros
  4. Configuration Management
  5. Examples

Features

LAMA offers the following features: It installs two event handlers: {@link lama_alarm_h} (that replaces SASL's standard alarm_handler), and {@link lama_syslog_h} (in error_logger event manager). Both event handlers are fault tolerant by being supervised by guarding processes (see {@link lama_guard}). Module {@link lama} implements the application LAMA and its supervisor. Note that this application will not start unless SASL is started.

Configuration Options

{notify_name, NotifyName::string()}
NotifyName is a key from the SNMP's ``notify.config'' file. It defines the host destinations for all alarms sent to an SNMP manager. Default value is "".
{alarm_traps, AlarmTraps::list()}
A mapping between AlarmIDs and Traps. It is used to lookup a trap when a corresponding alarm is set. ``AlarmTraps'' contains either {AlarmID, Trap, Varbinds} tuples, or an atom: ``os_mon'' - for setting all three OS_MON's traps (process memory / system memory / disk).
{syslog_host, HostName::string()}
Host for receiving syslog messages. Default: "localhost".
{syslog_indent, Indent::atom()}
Default indent used to identify the application in log messages. Use application:get_applicaiton/0 in applications. Default: lama.
{syslog_facility, Facility::atom()}
Log facility used by syslog. Default: user. Posible values: user,mail,daemon,auth,syslog,lpr,news,uucp,cron,ftp,local0-7
{syslog_types, Types::list()}
Types of messages that need to be sent to syslog. Default: [alert, error, warning]. By default ``notice'', ``debug'' and ``info'' messages are not sent to syslog, but printed to screen. Use this option to override the default behaviour.
{ignore_types, Types::list()}
Types of messages that will be ignored. Supported values [alert, error, warning, notice, debug, info, log]. Default: []. If you want to completely ignore some message types, use this option. This is convenient when you want to have some debugging information printed during development, and don't want that verbosity in production.
{display_types, Types::list()}
Types of messages that will be output to console screen. Supported values [alert, error, warning, notice, debug, info]. Default: [alert, error, warning, notice, debug, info].
{logfile_types, Types::list()}
Types of messages that will be saved to a log file. Supported values [alert, error, warning, notice, debug, info, log]. Default: [alert, error, warning, log].
{logfile_name, Name::string()}
Filename of the logfile.
{logfile_append_date, Enable::bool()}
Append date "YYYYMMDD" to the name of a log file.
{alarm_set_priority, Priority::atom()}
Syslog priority to use when sending an alarm. Default: ``error''
{alarm_cleared_priority, Priority::atom()}
Syslog priority to use when clearing an alarm. Default: ``warning''
{debug_verbosity, Verbosity::atom()}
Controls verbosity of the ?DEBUG(Verbosity, Fmt, Args) macro. Default: ``lowest''. Allowed values: silent, lowest, low, medium, high, highest.

Programming Macros

?ALERT(Format, Args)
Notify error_logger handler with an event forwarded to syslog with the ``alert'' priority.
?ERROR(Format, Args)
Notify error_logger handler with an event forwarded to syslog with the ``error'' priority.
?WARNING(Format, Args)
Notify error_logger handler with an event forwarded to syslog with the ``warning'' priority.
?INFO(Format, Args)
Notify error_logger handler with an ``info'' event displayed on the terminal without standard error header.
?DEBUG(Verbosity, Format, Args)
Notify error_logger handler with an ``debug'' event displayed on the terminal without standard error header. The Verbosity parameter controls printing of the output to the console. This value is checked against the ``debug_verbosity'' environment option before sending a debug log event.
The same macros are also available with a ``DIST_'' prefix that will send the event to all known Erlang nodes.

Configuration Management

Lama module exports several functions (get_app_*, get_opt, verify_config) that can be used to perform type verification of configuration options. The following guideline is suggested:

Examples

@end