SNMP4J is a Java library that provides some classes in order to implement a SNMP Agent or Manager
Questions tagged [snmp4j]
268 questions
16
votes
3 answers
Getting started with SNMP4J
I need to make an agent in SNMP4J, but the documentation on how to get started is pretty poor. Does anyone have any experience with SNMP4J and could give me an idea on how to get started? Thanks.

joemoe
- 5,734
- 10
- 43
- 60
12
votes
1 answer
SNMP Library for Java
I need to make a feasibility study on various SNMP libraries. Currently I am using SNMP4J. My requirement is to compare various libraries with their features. I wasn't able to locate any useful reference links.
Please someone suggest any links.

Gapchoos
- 1,422
- 5
- 20
- 40
7
votes
1 answer
Embedded SNMP4j log access fail and success
I am using SNMP4j to write an agent in java, and that is progressing well. I can get and set valued (SNMPv1 only for now, but v3 is coming).
My next requirement is to log in my application log (not the SNMP4J log) specifically these three…

Jon
- 1,013
- 1
- 10
- 17
5
votes
1 answer
How ResponseListener works in snmp4j
I have written a simple program to understand how snmp4j asynchronous request/response works:
TransportMapping transport = new DefaultUdpTransportMapping();
Snmp snmp = new Snmp(transport);
transport.listen();
Address targetAddress =…

Majid Azimi
- 5,575
- 13
- 64
- 113
4
votes
1 answer
Java SNMP4J Trap application is freezing the GUI
I have an SNMP trap application in Java that aims at listening to an SNMP agent and printing the received SNMP messages on a JTextArea in a JFrame window.
Part I below is my source code showing the content of class TrapReceiver. In this class, the…

F. Aydemir
- 2,665
- 5
- 40
- 60
4
votes
2 answers
Build custom MIB? SNMP4j
I would like to build a custom MIB in which I define some useful objects that can be accessed and managed by others (clients)..
I've been googling this for hours now without finding any interesting documentation about that..
So first of all, is is…

mimou
- 81
- 1
- 6
4
votes
2 answers
Checking requests that come in through SNMP
So I'm still in the process of learning SNMP, please go easy. I'm using snmp4j, not just the libraries but I've loaded the source code and I'm not against modifying the source if it gets me what I need. I've programmed an agent and a test client.…

Otra
- 8,108
- 3
- 34
- 49
4
votes
1 answer
SNMP4j with snmpv3 response and error is null
I'm using snmp4j 3.4.2 inside my java application (full code below)
I'm trying to execute a snmpget with snmpv3, security DES and auth MD5 and custom OID (python script, which is executed by snmp's extend funtionality). To create better…

I. Shm
- 173
- 13
4
votes
1 answer
Unable to register OID's in mock SNMP4J agent
I am attempting to mock a SNMP agent for testing purposes. The problem that I am running into is that I am not able to register some of the OIDs that the mock agent needs to produce.…

Carbonado Albatross
- 41
- 2
4
votes
2 answers
registering OIDs with snmp agent
I am trying to simulate SNMP agent using snmp4j.
I am trying to register MOs to the agent.
Below is code snippet:
static final OID mo1= new OID("1.3.6.1.4.1.1234.1.104");
static final OID mo2= new OID("1.3.6.1.4.1.1234.1.104.1");
static final OID…

javalearner
- 66
- 6
4
votes
3 answers
SNMP GETBULK Issue: Only could get parts records(Such as 59 records, but there are more than 100 records)
I would like to get the interface information for the router by snmp GETBULK, but when I use it, only parts of the record were returned.
The code is below:
public static void main(String[] args) throws IOException, InterruptedException {
Snmp…

azury
- 83
- 2
- 5
4
votes
1 answer
creating an empty row to snmp4j MOTable
I have created an snmp agent simulator and implemented conceptual row in it.So i want to add an empty row to the MOTable in snmp4j. I tried the code below.
private MOTableRow createEmptyRow(MOTable motable, OID index)
{
Variable[] vars = new…

Nikhil
- 2,857
- 9
- 34
- 58
3
votes
3 answers
SNMP EventTime in Human Readable format in Java
I have a stand alone java application that receives SNMP messages via an SNMP trap. I am using SNMP4J library in my application. In the SNMP message received, I need to convert the event time field, which is in hexadecimal format, into a human…

F. Aydemir
- 2,665
- 5
- 40
- 60
3
votes
2 answers
SNMP4J getting and setting values
I need to get and set a few values by SNMP v2. I'm looking for simple example of code which using SNMP4J (or any another library) to get and set values by OIDs.

Vladimir Petrosyan
- 499
- 1
- 3
- 13
3
votes
1 answer
Unable to receive SNMPv3 Traps few times after the first Send. [snmp4j-Java]
I'm struggling from past few days to send SNMPV3 trap using Auth and priv phrase. The problem is : After i receive the first Trap SNMPv3 with Auth-Priv, i cannot receive the trap after sometimes (about 2minutes) . The receiver is like ignoring every…

Abdelhakim Ait Errami
- 101
- 6