SNMP trap forwarding.

C

Carlos Zampar

Hi,

I want to listen the trap and send this trap to another plataform. At
first time and search in web I try this:
-------------------------------------------
require 'snmp'

m = SNMP::TrapListener.new:)Host => '10.10.5.114',:port => 162,
:Community => 'public',:MaxReceiveBytes => 18000) do |manager|
manager.on_trap_default { |trap| p trap


SNMP::Manager.open:)Host => '10.10.5.56',:TrapPort => 2017,:Version =>
:SNMPv1,:MaxReceiveBytes => 18000) do |snmp|
snmp.trap_v1(
"enterprises.9",
"10.10.5.56", #example I want put the trap data here
:enterpriseSpecific,
42,
12345)
#[VarBind.new("1.3.6.1.2.3.4", Integer.new(1))])
end

}
end
m.join
-------------------------------------------------------------------------------

My question is how to put the trap data listened to send snmp trap like
a original trap. I try to search for examples in web but I don't find a
good example for this use.

Thanks in advance. Carlos.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,261
Messages
2,571,040
Members
48,769
Latest member
Clifft

Latest Threads

Top