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

Compare with Current View Page History

Version 1 Next »

Article Contents

\n \n \n
\n

\nOverview

\n \n

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

\n

\nTrap 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. \nHere is a brief summary of what happens when an SNMP trap is sent: \n

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

Below is a diagram depicting the process:

\n \n

\n \n \n

\n \n \n
\n

\nSNMP Trap Scripts Configuration

\n
    \n
  1. Download the SNMP Trap Receiver Scripts
  2. \n
  3. Extract Trap_Receiver_Scripts.zip file
  4. \n
  5. Put the files in an appropriate directory (e.g. C:uptime)
  6. \n
  7. Open Trap_Receiver.bat and look for the “SCRIPT_DIR” variable. Change it to where you have put the scripts in step 2.
  8. \n
  9. Open Trap_Receiver.vbs and modify a few variables if needed: \n
      \n
    1. MonitoringStationHost
      \n…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. \n

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

    4. \n
    5. AlertStatus
      \n…this is the severity of the alert in up.time when an SNMP trap is received.
      \n

      \n

      \nThe value can be one of the following integers:
      \n

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

      \n \n

    6. \n
    \n
\n \n \n \n
\n

\nTrap Receiver Configuration

\n
    \n
  1. Download Trap Receiver from the following website: \n

    http://www.trapreceiver.com

    \n
  2. \n
  3. Install Trap Receiver
  4. \n
  5. Launch the Trap Receiver UI
  6. \n
  7. Click on the “Configure” button: \n

    \n
  8. \n
  9. You should be at the “Actions” tab. Click “Add”: \n

    \n
  10. \n
  11. 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. \n
    \nTo add a new action tied to a particular IP: \n
      \n
    1. Under “Watch”, select “Sender IP”.
    2. \n
    3. Under “Equals”, input the IP Address of the device that will be sending the SNMP Traps.
    4. \n
    5. Check the “Execute” checkbox and click “Configure”
    6. \n

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

      \n
    10. \n
    11. Check the “Include Trap Data” checkbox. See below:
    12. \n

      \n
    13. Click “OK”
    14. \n
    15. Click “Update” to get back to the Configure Trap Receiver window.
    16. \n
    \n
  12. Go to the “Trap Data” tab \n
      \n
    1. Check the “Pass to Command Line” checkbox
    2. \n
    3. Click “Specify Parameters” \n

      \n
    4. \n
    5. Make sure the following lines are checked and the Command Line Flags are as follow: \n

      \n

      \n \n \n \n \n \n\t \n \n \n \n \n \n \n \n \n \n \n
      VariableCommand Line Flags
      Ip AddressIpAddress
      Varbind DataVarbindData
      Varbind OIDVarbindOID
      \n

      \nThe end result should look like this: \n

      \n
    6. \n
    7. Click “OK” when complete
    8. \n
    \n
  13. 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.
    \nGo to the “Mibs” tab in the “Configure Trap Receiver” window \n
      \n
    1. Check the “Translate OIDs” checkbox
    2. \n
    3. Obtain vendor-specific MIBs and load them by clicking the “Load MIB” button \n

      \n
    4. \n
    5. Click “OK” when finish loading MIBs
    6. \n
    \n \n
    \n

    \nup.time Configuration

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