Moogsoft Docs

Configure the Trapd LAM

The Trapd LAM allows Moogsoft AIOps to receive and process trap messages as events.

You can configure the Trapd LAM to process SNMPv1 traps, SNMPv2 informs and, SNMPv3 traps and informs.

For an overview of trap processing and the different versions of SNMP see Ingest SNMP Traps.

Before You Begin

Before you set up your Trapd LAM LAM, ensure you have met the following requirements:

  • Ensure port 162, the default port for receiving SNMP traps over UDP, is available and open on Moogsoft AIOps. Alternatively configure another port to receive the traps.

  • You have parsed any MIB files into JSON format using the mibparser utility. See Parse MIBs for Trap Integration.

  • If using SNMPv3, you have generated the engine ID of your SNMP application in hexadecimal format.

If you are configuring a distributed deployment refer to High Availability Overview first. You will need the details of the server configuration you are going to use for HA.

Configure the LAM

Edit the configuration file to control the behavior of the Trapd LAM. You can find the file at $MOOGSOFT_HOME/config/trapd_lam.conf.

See the Trapd LAM Reference and LAM and Integration Reference for a full description of all properties. Some properties are commented out by default. Uncomment properties to enable them.

  1. Configure the connection properties:

    • trap_port: Port the Trapd LAM uses to receive traps. SNMP agents typically send traps to port 162 via UDP.

    • concurrency: Maximum number of threads the Trapd LAM can use for receiving and processing traps.

    • name_resolution: The hostname of the IP address the trap came from.

  2. Configure the Trapd LAM behavior:

    • event_ack_mode: Determines when Moogsoft AIOps acknowledges an event from the Trapd LAM during processing.

    • mib_db_file: Defines the location where the Mibparser utility exports and parses its MIBs. See Parse MIBs for Trap Integration for more details.

  3. Optionally configure the USM file and engine ID properties if you want to use SNMPv3:

    • usm_file: Path to your User-based Security Model (USM) file that allows you to authenticate and encrypt messages for SNMPv3.

    • local_engine_id: Engine ID of the SNMP monitor that sends Inform messages to your Trap LAM.

  4. Optionally configure the LAM identification and logging details in the agent and log_config sections of the file:

    • name: Name of the SNMP agent that is the source of the trap messages.

    • capture_log: Location of the LAM's capture log file.

    • configuration_file: Name and location of the LAM's process log configuration file.

  5. Optionally configure severity conversions. See Severity Reference for further information and "Conversion Rules" in Data Parsing for details on conversions in general.


The following example shows a Trapd LAM that is able to process SNMPv3 traps and informs:

    name                : "Trap Monitor",
    class               : "CTrapMonitor",
    trap_port           : 162,
    concurrency         : 5,
    name_resolution     : false,
    event_ack_mode      : "queued_for_processing",
    mib_db_file         : "etc/myParsedMibs.json",
    usm_file            : "$MOOGSOFT_HOME/config/trapd_usm.conf",
    local_engine_id     : "03c4b11e3e"
    name                : "DATA_SOURCE",
    #capture_log        : "$MOOGSOFT_HOME/log/data-capture/trapd_lam.log"
    configuration_file  : "$MOOGSOFT_HOME/config/logging/trapd_lam_log.json"
Configure for High Availability

Configure the Trapd LAM for high availability if required. See High Availability Overview for details.

Configure LAMbot Processing

The Trapd LAMbot processes and filters events before sending them to the Message Bus. You can customize or bypass this processing if required. You can also load JavaScript files into the LAMbot and execute them.

See LAMbot Configuration for more information. An example Trapd LAM filter configuration is shown below.

    presend: "TrapdLam.js"
Start and Stop the LAM

Restart the Trapd LAM to activate any changes you make to the configuration file or LAMbot.

The LAM service name is trapdlamd.

See Control Moogsoft AIOps Processes for further details.