LogTrend's Complex Alarms Developer Guide

[logo]

LogTrend

Copyright  2001 by LogTrend http://www.logtrend.org

This software and all affiliated files are Copyright (C) 2001 by Atrid Systmes
under the terms of the GNU General Public License. A copy of this license
entitled "GNU General Public License" is included with the software. The
original text can be found on http://www.gnu.org/copyleft/gpl.html

Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.1 or any later version
published by the Free Software Foundation; with no Invariant Sections , with no
Front-Cover Texts , and with no Back-Cover Texts. A copy of the license
entitled "GNU Free Documentation License" can be found with this software. The
original text can be found on http://www.gnu.org/copyleft/fdl.html

-------------------------------------------------------------------------------

Table of Contents
1. Extend complex alarms features
   
    Develop new detection functions
       
        Internal data representation
        Implementing detection functions
       
    Develop new complex alarms' actions
   
List of Tables
1-1. Data internal representation

-------------------------------------------------------------------------------

Chapter 1. Extend complex alarms features

Develop new detection functions

Internal data representation

Data are stored in hash having variable names as keys and data tabular as data.

Table 1-1. Data internal representation

+-----------+-----------+-----------+
|   var1    |   var2    |   var3    |
+-----+-----+-----+-----+-----+-----+
|Value|Date |Value|Date |Value|Date |
+-----+-----+-----+-----+-----+-----+
|  .  |  .  |  .  |  .  |  .  |  .  |
+-----+-----+-----+-----+-----+-----+
|  .  |  .  |  .  |  .  |  .  |  .  |
+-----+-----+-----+-----+-----+-----+
|  .  |  .  |  .  |  .  |  .  |  .  |
+-----+-----+-----+-----+-----+-----+

-------------------------------------------------------------------------------

Implementing detection functions

Detection functions are perl packages. Standard detection functions are in the
LogTrend::ComplexAlarm::Function::DetFuncStdlib package but user defined
detection functions must be placed in package named LogTrend::ComplexAlarm::
Function::DetFuncName.

These packages must implement :

  * 
    Properties(det_func_args);
   
  * 
    Run(init_val_tab_ref, var_type_tab_ref, current_res_tab_ref,
    det_func_args);
   
      + init_val_tab_ref : Hash ref of data initial values.
       
      + var_type_tab_ref : Hash ref of data types (data_name, data_type).
       
      + cur_val_tab_ref : Hash ref of data current values.
       
-------------------------------------------------------------------------------

Develop new complex alarms' actions

Actions are just a package named LogTrend::ComplexAlarm::Action::PckNameAction.
This package must contains a methods called Run which is called when the action
must be launched and the constructor (new).

Prototypes :

  * 
    new(alarm_name, alarm_level, xml_node);
   
    This method must parse the xml action config node.
   
  * 
    Run();
   
    No attributes, must run the action.
   
This package must be in LogTrend/ComplexAlarm/Action or in a directory present
in the environment variable ACTION_PATH.

