SNMP4J is a Java library that provides some classes in order to implement a SNMP Agent or Manager
Questions tagged [snmp4j]
268 questions
3
votes
1 answer
how to receive source IP address from multiple snmp traps with snmp4j
i'm using snmp4j to capture trap data from multiple routers,but i don't know how to receive the source IP address from these routers, which router is the sender. That's my code below, maybe it's useful:
public class SNMPTrapReceiver implements…

Lewis Lynn
- 31
- 3
3
votes
1 answer
How do I keep SNMP4J GETBULK from incrementing rightmost digit before OID?
I'm using this SNMP4J code to do some SNMP walks. But, when I run it on say, 1.3.6.1.2.1.31.1.1.1.1 which is ifName, it gets all the interfaces which are represented by 1.3.6.1.2.1.31.1.1.1.1.x, but then it also grabs 1.3.6.1.2.1.31.1.1.1.2 which…

Jon A
- 362
- 4
- 14
3
votes
2 answers
What is a simple way to receive SNMP traps in Scala?
I'd love it if there is an awesome native Scala library for SNMP like there is Dispatch for HTTP but I can't find one. Is there one? Baring that, should I use a Java library like SNMP4J? What I want to do is so simple that it almost seems like…

pr1001
- 21,727
- 17
- 79
- 125
3
votes
4 answers
SNMP constructor takes several seconds to return
I'm using Snmp4j 2.2.3 and I am observing a lag of up to 8 seconds when I construct a org.snmp4j.Snmp object via public Snmp(TransportMapping) I wonder if anyone knows where in Snmp I should focus my attention. I see this happening on Redhat Linux,…

8BitCoder
- 309
- 1
- 10
3
votes
2 answers
snmp4j snmpwalk with Community String Indexing
How to do a snmpwalk with snmp4j and Community String Indexing?
I can do a Community String Indexing by changing the community String like public@123
(123 is the vlanId)
But this works only with snmpget !!??:
public ResponseEvent get(OID oids)…

Thorsten Niehues
- 13,712
- 22
- 78
- 113
3
votes
1 answer
Monitoring a JVM with SNMP
I'm using snmp to monitore some servers (win2k3 mostly) and during my journey on internet, I found a MIB done by Oracle for monitoring a JVM, JVM-MANAGEMENT-MIB. What I did so far to use it is :
Configure the JVM with snmp.acl and…

jacen44
- 168
- 3
- 18
3
votes
0 answers
how can I develop a class for searching OID values with SNMP4j
I am preparing to develop an application for monitoring network traffic specifically the SNMP protocol. In my research, I have discovered the Java API SNMP4j, but I am confused about how to begin. Does anyone have a tutorial to help me,…

Lina
- 451
- 1
- 8
- 23
3
votes
2 answers
SNMP: snmp4j / snmpwalk result differs
I'm sending a requests for snmp nodes using this example:
PDU pdu = new PDU();
pdu.add(new VariableBinding(new OID("1.3.6.1.2.1.1.1")));
pdu.add(new VariableBinding(new OID("1.3.6.1.2.1.1.9.1.2.1")));
pdu.setType(PDU.GETNEXT);
and results…

gaffcz
- 3,469
- 14
- 68
- 108
2
votes
2 answers
Java SNMP API Choice
I know this question has been asked many times over, but I am currently using snmp4j library and I am finding it very slow. It takes about six seconds for six queries even on my local system, and also I cannot get direct values such as particular…

Madusudanan
- 1,017
- 1
- 15
- 36
2
votes
1 answer
How to add the snmpv3 context name if using TableUtils.getTable in snmp4j
In snmp4j version 2.0.2, I'm using TableUtils.getTable to get the snmp info,
and I'm using usm.adduser to add all the profiles,
but I don't see a way to add the context name of the v3profile.
I know you can set the ScopePDU.setContextName, but…

Julie Losamo
- 21
- 2
2
votes
2 answers
snmp on devices via ssh
I have a device in network. I would like to use SNMP to get information. Is it possible for using SSH and then SNMP for messages over ssh session ? I am using Java for implementation.
It seems snmp4j is not yet ready for the snmp via ssh.
Can you…

riamob
- 289
- 1
- 7
- 18
2
votes
0 answers
Why is the last index missing from the query when using snmp4j instead of NET-SNMP?
Here is the snmp4j result image
When I use NET-SNMP, I can get the total data,but when I use snmp4j,I find that last data is missing.
It only return 8193.and getnext 8193 the responseEvent.getResponse() is null . What is the reason?
The NET-SNMP…

Rebecca
- 199
- 2
- 8
2
votes
1 answer
SNMP4J adding user
I've been doing some very basic SNMP4J programming. All I want to do is send a simple "get" request but so far my responses have been null. I opened up wireshark and found that in the under Simple Network Management Protocol, my msgUserName is blank…

Otra
- 8,108
- 3
- 34
- 49
2
votes
1 answer
How to configure engine ID to send SNMP trap V3 using SNMP4J?
I'm using snmp4j 2.8.4 and Java 1.8
It works when I use the command line to send traps.for example
snmptrapd.conf
authCommunity log,execute,net public
createUser -e 0x8000000001020304 myuser MD5 mypassword DES mypassword1
authUser log,execute,net…

sun
- 21
- 1
2
votes
1 answer
snmpwalk -m with snmp4j
on linux I can execute something like this snmpwalk -c public -v2c -m
I would like to implement this same line in java using snmp4j. Is it possible? I didn't find any examples using the -m parameter to load the…

Kelly Goedert
- 1,027
- 2
- 11
- 37