title: Why can't I see SNMP Traps coming in?
body: <p>I'm attempting to use <a href="http://snmplib.rubyforge.org/" rel="nofollow">Ruby SNMP</a> to capture SNMP traps from various devices. In order to test them I'm attempting to send them from my laptop using the 'snmptrap' command. I can see that the traps are being sent and arriving at my server (the server is the manager) in packet captures, as well as in the 'snmptrapd' utility when I run it. I'm using the following example code exactly as it is, in the demo from the documentation to set up a TrapListener. </p>
  
  <pre><code>require 'snmp'
  require 'logger'
  
  log = Logger.new(STDOUT)
  m = SNMP::TrapListener.new do |manager|
      manager.on_trap_default do |trap|
        log.info trap.inspect
      end
  end
  m.join
  </code></pre>
  
  <p>I'm sending an SNMPv2c trap, and nothing ever appears on the screen...</p>
  
  <p>Here is the command I'm using to send a test SMTP trap, in the even that it's useful:</p>
  
  <pre><code>snmptrap -v 2c -c public hostname_goes_here  SNMP-NOTIFICATION-MIB::snmpNotifyType SNMPv2-MIB::sysLocation
  </code></pre>
  
  <p>Any suggestions appreciated! Thanks!</p>