You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Article Contents

 

 


 

Overview

 

The purpose of this article is to outline steps to easily deploy a trap listener in your infrastructure to drive SNMP trap alerts into up.time. Although the article utilizes Trap Receiver to receive SNMP Traps and execute scripts, one can use any SNMP trap receiver as long as it can execute scripts when traps are received.

 

Trap Receiver is a utility for Windows. If the up.time Monitoring Station is on Windows, you may choose to install it on the same server. Here is a brief summary of what happens when an SNMP trap is sent:

  • the SNMP-enabled device sends an SNMP trap to the SNMP Trap Receiver
  • Trap Receiver reviews the list of configured Actions and executes Action(s) if the trap meets the filter
  • the Trap Receiver Action executes the Trap_Receiver.bat script, which is a wrapper for Trap_Receiver.vbs
  • Trap_Receiver.vbs calls up.time API to update the status of the External Check monitor associated with the device
  • if an Alert Profile is associated with the monitor, an alert notification is sent out

 

Below is a diagram depicting the process:

 

 

 

 


 

SNMP Trap Scripts Configuration

 

  1. Download the SNMP Trap Receiver Scripts
  2. Extract Trap_Receiver_Scripts.zip file
  3. Put the files in an appropriate directory (e.g. C:uptime)
  4. Open Trap_Receiver.bat and look for the “SCRIPT_DIR” variable. Change it to where you have put the scripts in step 2.
  5. Open Trap_Receiver.vbs and modify a few variables if needed:
    1. MonitoringStationHost
      …this is where the up.time Monitoring Station is installed. Make certain the hostname/IP used can communicate from where the scripts are to the Monitoring Station.

    2. MonitoringStationPort
      …this is the port up.time uses for the API. By default it’s 9996.

    3. AlertStatus
      …this is the severity of the alert in up.time when an SNMP trap is received.

      The value can be one of the following integers:

      • 0=OK
      • 1=Warning
      • 2=Critical
      • 3=Unknown

 


 

Trap Receiver Configuration

 

  1. Download Trap Receiver from the following website:

    http://www.trapreceiver.com

  2. Install Trap Receiver
  3. Launch the Trap Receiver UI
  4. Click on the “Configure” button:

  5. You should be at the “Actions” tab. Click “Add”:

  6. Since the IP of the device sending out SNMP traps might be displayed differently in up.time, a separate action should be created for each device so that the proper hostname can be passed to up.time.
    To add a new action tied to a particular IP:
      1. Under “Watch”, select “Sender IP”.
      2. Under “Equals”, input the IP Address of the device that will be sending the SNMP Traps.
      3. Check the “Execute” checkbox and click “Configure”

      1. Click on the “…” button and select the “Trap_Receiver.bat” from SNMP Trap Scripts Configuration Step 2
      2. In the Arguments box, type the following:
        --hostname=yourDeviceName
        
        …where “yourDeviceName” is the “Host Name” in up.time. The “Host Name” can be found under the “Info” tab in up.time. For example:

      3. Check the “Include Trap Data” checkbox. See below:

    1. Click “OK”
    2. Click “Update” to get back to the Configure Trap Receiver window.
  7. Go to the “Trap Data” tab
    1. Check the “Pass to Command Line” checkbox
    2. Click “Specify Parameters”

    3. Make sure the following lines are checked and the Command Line Flags are as follow:

       

      \t

      VariableCommand Line Flags
      Ip AddressIpAddress
      Varbind DataVarbindData
      Varbind OIDVarbindOID

       

      The end result should look like this:

    4. Click “OK” when complete
  8. The SNMP variables, by default, will be shown as numbers (e.g. 1.3.6…). To show more meaningful variable names, you will need to load the appropriate MIBs from your devices.
    Go to the “Mibs” tab in the “Configure Trap Receiver” window
    1. Check the “Translate OIDs” checkbox
    2. Obtain vendor-specific MIBs and load them by clicking the “Load MIB” button

    3. Click “OK” when finish loading MIBs

    up.time Configuration

    Add an “External Check” Service Monitor in up.time:
    1. Click on the “Services” button at the top
    2. Click “Add Service Monitor” on the left
    3. Select “External Check” from the list of available Service Monitors and click “Continue…”
    4. Input “SNMP-Trap” as the Service Name
    5. From the drop down menu where it says "Select a System", select the host/device that will be sending the SNMP trap
    6. Click “Finish”
  • No labels