Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
Eugene Condor
Greenhorn
+ Follow
news
2
Posts
1
Threads
since Aug 12, 2010
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads
Recent posts by Eugene Condor
SNMP Trap Severity
Hi,
Thanks for the welcome,
yes your right, theres no available docs for adding severity in SNMP4j trap.
Do you have any idea how to do it?
Thanks for the reply,
show more
14 years ago
Other Open Source Projects
SNMP Trap Severity
Hi,
How do you add a severity in SNMP trap?
I'm using SNMP4j. Code Below :
TransportMapping transport = new DefaultUdpTransportMapping(); Snmp snmp = new Snmp(transport); CommunityTarget localtarget = new CommunityTarget(); localtarget.setCommunity(new OctetString("public")); localtarget.setAddress(new UdpAddress(managerIpAdd + "/162")); localtarget.setVersion(SnmpConstants.version2c); localtarget.setRetries(3); localtarget.setTimeout(2000); PDU pdu = new PDU(); // need to specify the system up time pdu.add(new VariableBinding(SnmpConstants.sysUpTime, new OctetString(new Date().toString()))); pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID, targetOID)); pdu.add(new VariableBinding(SnmpConstants.snmpTrapAddress, new IpAddress(ApplicationUtil.getMachineIpAddress()))); // variable binding for Enterprise Specific objects, Severity (should be defined in MIB file) pdu.add(new VariableBinding(targetOID, new OctetString(message))); pdu.setType(PDU.TRAP); snmp.send(pdu, localtarget); snmp.close();
Thanks
show more
14 years ago
Other Open Source Projects