Simulating Alarms in DX NetOps Spectrum
search cancel

Simulating Alarms in DX NetOps Spectrum

book

Article ID: 438756

calendar_today

Updated On:

Products

Network Observability Spectrum

Issue/Introduction

A user wants to simulate specific alarms, such as BAD LINK DETECTED and PERCENT ERRORS THRESHOLD EXCEEDED, using the Spectrum command-line interface (CLI). The requirement is to include all associated variables to match real-world scenarios.

Environment

Spectrum, all supported versions

Cause

The primary method for CLI alarm simulation is the create event command. However, this command has a limitation where it only supports a single variable ({S 0}). Complex alarms that rely on multiple dynamic variables, calculated attributes (like ifOperStatus), or polling intervals may not be fully simulated using only the CLI

Resolution

There are three primary methods to simulate alarms in DX NetOps Spectrum, depending on the complexity of the alarm and the variables required.

Method 1: Using the Spectrum CLI (Basic Simulation)

The CLI create event command can assert or clear alarms by generating specific event codes.

  1. Navigate to the $SPECROOT/vnmsh directory.
  2. Run ./connect to establish a CLI session.
  3. Use the following syntax to create an event:
    bash
     
    ./create event type=[EventCode] text="[Description]" mh=[ModelHandle]
    Note: This method only supports the {S 0} variable. Is there a way to test asserting and clearing a custom alarm in Spectrum?

Method 2: Using the snmptrap Utility (Complex Simulation)

For alarms requiring multiple variable bindings, the snmptrap utility can simulate the actual trap a device would send to the SpectroSERVER.

  1. Formulate an snmptrap command from the command line.
  2. Include the necessary OIDs and values to match the expected trap structure. This method allows for multiple variable bindings, bypassing the CLI's single-variable limitation. Customizing 0x6c10000 event code to generate a Conditional alarm severity

Method 3: Using the Web Services (REST) API

The Spectrum Web Services API provides a way to create events without the limitations of the command line.

  1. Use a POST request to the events resource.
  2. This method is effective for automated testing and scenarios requiring detailed event data. DX NetOps Spectrum Web Services API - POST Event