SNMP Trap Proposed Architecture

From SIPfoundry sipXecs IP PBX, The Open Source SIP PBX for Linux - Calivia

(Difference between revisions)
Jump to: navigation, search
(Created page with 'This is the proposed new architecture for SNMP Traps in sipXecs. To go back to the main SNMP Trap page Click Here __TOC__ =Introduction= SNMP is based on the mana...')
(Packages Required)
 
Line 270: Line 270:
The open source packages required for this feature are as follows:
The open source packages required for this feature are as follows:
-
5.2.1 net-snmp
+
net-snmp
There are 3 approaches for doing the net-snmp packaging:
There are 3 approaches for doing the net-snmp packaging:
# The net-snmp-agentx(sipX agent) can be implemented using the net-snmp source tarball. Integrate the C code generated from the MIB file into the net-snmp source code. Finally link net-snmp agent source code with sipxecs.
# The net-snmp-agentx(sipX agent) can be implemented using the net-snmp source tarball. Integrate the C code generated from the MIB file into the net-snmp source code. Finally link net-snmp agent source code with sipxecs.

Current revision as of 14:35, 16 November 2009

This is the proposed new architecture for SNMP Traps in sipXecs. To go back to the main SNMP Trap page Click Here

Contents


Introduction

SNMP is based on the manager/agent model consisting of an SNMP manager, a SNMP agent, a database of management information, managed SNMP devices and the network protocol. The SNMP manager provides the interface between the human network manager and the management system. The SNMP agent provides the interface between the manager and the physical device(s) being managed. The SNMP manager and agent use an SNMP Management Information Base (MIB) and a relatively small set of commands to exchange information. The SNMP MIB is organized in a tree structure with individual variables, such as point status or description, being represented as leaves on the branches. A long numeric tag or object identifier (OID) is used to distinguish each variable uniquely in the MIB and in SNMP messages. SNMP uses five basic messages (GET, GET-NEXT, GET-RESPONSE, SET, and TRAP) to communicate between the SNMP manager and the SNMP agent. The GET and GET-NEXT messages allow the manager to request information for a specific variable. The agent, upon receiving a GET or GET-NEXT message, will issue a GET-RESPONSE message to the SNMP manager with either the information requested or an error indication as to why the request cannot be processed. A SET message allows the SNMP manager to request a change be made to the value of a specific variable in the case of an alarm remote that will operate a relay. The SNMP agent will then respond with a GET-RESPONSE message indicating the change has been made or an error indication as to why the change cannot be made. The SNMP TRAP message allows the agent to spontaneously inform the SNMP manager of an "important" event. This feature will add the SNMPv2 trap support in sipXecs and will enable the sipXecs system to configure and send the alarms generated in the system as SNMP traps.


Functional Requirements

sipXagent requirements to support SNMP traps:

Implement a MIB of the Alarms.

The list of alarms generated by the sipXecs are as follows:

Alarm Code Alarm Title
SPX00012 Emergency number dialed
SPX00005 Login failed
SPX00039 Stray packets were detected by the Media Relay service.
SPX00023 Failed to initialize the Media Relay.
SPX00024 SipXproxy lost contact with the Media Relay.
SPX00027 SipXproxy re-established connection with the Media Relay.
SPX00025 SipXproxy detected a Media Relay reset but recovered.
SPX00026 SipXproxy detected a Media Relay reset and is trying to recover.
SPX00028 SipXproxy ran out of resources for NAT traversal.
SPX00030 Process failed configuration test
SPX00032 Process configuration file mismatch
SPX00004 Process failed
SPX00031 Process resource required
SPX00002 Restarting process
SPX00001 Process started
SPX00022 Could not send REGISTER to the ITSP account.
SPX00017 The ITSP Account has recovered
SPX00015 The ITSP disallowed an Authentication attempt
SPX00040 An ITSP is missing required configuration parameters
SPX00020 An ITSP account could not be found.
SPX00019 The ITSP reported a server failure.
SPX00016 The ITSP Account could not be reached
SPX00021 Software Updates Available.
SPX00013 Public address discovery failed
SPX00014 The STUN Server recovered
SPX00018 The STUN Address cannot be resolved.
SPX00029 NAT Reboot or SIPX Public Address change detected.
SPX00006 CPU threshold exceeded
SPX00007 CPU threshold recovered
SPX00008 Disk usage threshold exceeded
SPX00009 Disk usage threshold recovered

The alarm MIB will contain all the above mentioned alarms.

Support for SNMP v2 for traps.

SNMPv2 support for traps should be added into sipXecs. This should enable the sipXecs to inform a SNMP trap receiver of the occurrence of an important event (ex: alarms) in the system using SNMPv2 trap notifications. SNMPv1 traps will not be supported.

All the alarms mentioned above in 2.1.1 should be capable of being sent as SNMP v2 traps.

sipXconfig requirements to support SNMP agent configuration:

Support for basic SNMP management:

  • The user/administrator should be able to configure the sipx Agent using the sipXconfig. There should be provision to enable/disable the SNMP agent, configure community strings and the SNMP version to be used.
  • Support for configuring trap receivers in the Alarm Notification groups.
  • The Alarm MIB has to be stored in the sipXecs and there should be a provision in the sipXconfig to download the MIB.

High Level Design Details

sipXagent high level design details to support SNMPv2 traps

Support for MIB of the Alarms:

The alarm MIB will come under iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).pingtel(7142).sipxecs(100). The actual OID of the alarm MIB to be used is yet to be decided. It should be a new node under sipxecs(100) and the actual number to be used will be decided after consultation with the Nortel team involved in maintaining this MIB tree. The initial draft of the SIPXECS-ALARM-NOTIFICATION-MIB is mentioned in section 5.1. The sipxecs alarm is defined as a NOTIFICATION-TYPE object (a SNMv2 trap) sipxecsAlarmNotification having an OID of .1.3.6.1.4.1.7142.100.1.0.0. It has 6 VarBind values which defines the attributes of an alarm generated by sipxecs. The various alarm attributes and their corresponding object names are as follows:

Object name in the MIB Alarm attribute defined by the object
sipxecsAlarmId alarm code
sipxecsAlarmSource Host that generated the alarm.
sipxecsAlarmTime Time the alarm was generated.
sipxecsAlarmSeverity The Severity of the Alarm.
sipxecsAlarmDescr A textual description of the alarm.
sipxecsAlarmResolution Suggested resolution.

Support of SNMP v2 for traps:

The net-snmp (open source) SNMP tool will be used to implement the notification of alarms using SNMP traps. This will provide generic API’s for creating and sending traps. In sipXecs, we can create wrapper functions to use these API’s for sending alarm information to the trap receivers. This requires the net-snmp-devel package to be a part of the build.

All the alarms should be capable of being sent as traps:

This involves identifying the scenarios and code locations where these alarms are generated and implementing the code for sending SNMP traps if the SNMP agent is enabled in sipXconfig. New files (TrapNotifier.h and TrapNotifier.cpp) implementing the class TrapNotifier has to be introduced to send traps containing alarm description and resolution to configured trap receivers. Further investigation is required on this.

sipXconfig high level design details

sipXconfig UI design:

Screen proposals can be viewed on the Customer Features Page.

sipXconfig backend design

Agent Configuration & configuring Trap receivers:

  • Need to add new tapestry pages & java code for the agent configuration.
  • Need to add fields in the postgresql Db to store the SNMP configuration fields.

MIB Proposal

SIPXECS-ALARM-NOTIFICATION-MIB :

   --
   -- Name:     sipXecs alarm notification MIB
   -- Purpose:  To define the alarm notifications generated by sipXecs
   -- File:     SIPXECS-ALARM-NOTIFICATION-MIB.mib
   -- OID:      1.3.6.1.4.1.7142.100
   -- Created:  04 November 2009
   -- Revision: 0.1
   -- Author:   Goutham B G
   --
   -- Copyright (c) 2009 Nortel Networks
   --
   -- Revision History:
   --     04 Nov 2009          0.1    Initial Draft
   SIPXECS-ALARM-NOTIFICATION-MIB DEFINITIONS ::= BEGIN
   -- Imports
   IMPORTS
   MODULE-IDENTITY, OBJECT-TYPE, enterprises,
   NOTIFICATION-TYPE                       FROM SNMPv2-SMI
   SnmpAdminString                         FROM SNMP-FRAMEWORK-MIB
   ;    
   --
   -- sipXecs MIB
   --
   -- Pingtel enterprise identifier
      pingtel              OBJECT IDENTIFIER ::= { enterprises 7142 } -- .1.3.6.1.4.1.7142
   -- sipXecs product branch (root node)
      sipxecs              OBJECT IDENTIFIER ::= { pingtel 100 }
   -- sipXecs sub-branches (1st level nodes)
   -- Alarms generated by sipXecs
      alarms               OBJECT IDENTIFIER ::= { sipxecs 1 } -- .1.3.6.1.4.1.7142.100.1
      alarmNotifications                OBJECT IDENTIFIER
                                   ::= { alarms 0 } -- .1.3.6.1.4.1.7142.100.1.0
   alarmAttributes                   OBJECT IDENTIFIER
                                   ::= { alarms 1 } -- .1.3.6.1.4.1.7142.100.1.1
   -- Alarm attributes
   sipxecsAlarmId OBJECT-TYPE
   SYNTAX      SnmpAdminString
   MAX-ACCESS  accessible-for-notify
   STATUS      current
   DESCRIPTION
   "A simple string that uniquely identifies an alarm."
   ::= { alarmAttributes 0 }
   sipxecsAlarmSource OBJECT-TYPE
   SYNTAX      SnmpAdminString
   MAX-ACCESS  accessible-for-notify
   STATUS      current
   DESCRIPTION
   "The host that generated the alarm."
   ::= { alarmAttributes 1 }
   sipxecsAlarmTime OBJECT-TYPE
   SYNTAX	OCTET STRING
   MAX-ACCESS  accessible-for-notify
   STATUS      current
   DESCRIPTION
   "The time the alarm was generated."
   ::= { alarmAttributes 2 }
   sipxecsAlarmSeverity OBJECT-TYPE
   SYNTAX	OCTET STRING
   MAX-ACCESS  accessible-for-notify
   STATUS      current
   DESCRIPTION
   "The Severity of the Alarm. The severity is one of info, warning, error, critical."
   ::= { alarmAttributes 3 }
   sipxecsAlarmDescr OBJECT-TYPE
   SYNTAX	OCTET STRING
   MAX-ACCESS  accessible-for-notify
   STATUS      current
   DESCRIPTION
       "A textual description of the alarm."
   ::= { alarmAttributes 4 }
   sipxecsAlarmResolution OBJECT-TYPE
   SYNTAX	OCTET STRING
   MAX-ACCESS  accessible-for-notify
   STATUS      current
   DESCRIPTION
       "Suggested resolution."
   ::= { alarmAttributes 5 }
   -- Alarm notifications generated by sipXecs is defined in the below node.
   sipxecsAlarmNotification NOTIFICATION-TYPE
   OBJECTS     { sipxecsAlarmId,
                 sipxecsAlarmSource,
                 sipxecsAlarmTime,
                 sipxecsAlarmSeverity,
                 sipxecsAlarmDescr,
                 sipxecsAlarmResolution }
   STATUS      current
   DESCRIPTION
       "Notification of the alarm generated by sipxecs. The attributes of this alarm are Alarm code,
        the host that generated the alarm, time the alarm was generated, alarm severity, description 
        of the alarm and the suggested resolution."
   ::= { alarmNotifications 0 } -- .1.3.6.1.4.1.7142.100.1.0.0
   END

Packages Required

The open source packages required for this feature are as follows:

net-snmp There are 3 approaches for doing the net-snmp packaging:

  1. The net-snmp-agentx(sipX agent) can be implemented using the net-snmp source tarball. Integrate the C code generated from the MIB file into the net-snmp source code. Finally link net-snmp agent source code with sipxecs.
  2. Use the following with pre-packaged binaries rpm’s for writing sipX agent code:
    1. net-snmp ( The standard agent binary)
    2. net-snmp-libs (libraries (and MIB files))
    3. net-snmp-utils (command-line tools (snmpget/snmpwalk/etc))
    4. net-snmp-devel (The header files (and static libraries))
  3. Use mib2c compiler along with pre-packaged binaries rpm’s of option 2:

So this means rpm’s mentioned in option 2 plus the following rpm:

  • net-snmp-perl ('mib2c' compiler)

As we don’t have to directly link the sipX SNMP agent code with net-snmp code & would need to have an option of auto-generating code from the MIB i.e. have a mib2c compiler. From the above mentioned 3 packaging alternatives, 3rd approach is selected & the same is being tested currently to check for any further rpm dependencies.

Personal tools