Questions tagged [snmp4j]

SNMP4J is a Java library that provides some classes in order to implement a SNMP Agent or Manager

268 questions
1
vote
1 answer

SNMP4J Client gives "Unsupported security level"

I'm about to implement a Client/Agent setup in order to learn using SNMP. I want to establish a secure and encrypted communication using SNMPv3 and authPriv as security level. Here's my setup: Agent The Agent is running on Ubuntu (within a Docker…
pschild
  • 2,918
  • 1
  • 19
  • 26
1
vote
1 answer

how get system info in snmpv3 using snmp4j-2.7.0

I'm trying to create small app to manage snmp devices and for start i want to get the system info. I'm using snmp4j version 2.7.0, java 1.8 and the device use snmpv3. For start i want to get the data synchronously. I try to do it in two ways but i…
yogev levi
  • 369
  • 1
  • 4
  • 21
1
vote
1 answer

How to send v3 trap with enginedId using snmp4j

I'm trying to create a standalone java application to send SNMP v3 Traps along with engineId. I'm using snmp4j 2.5.3 and Java 1.8 Below is the code snippet which I am using. When I provide engineId while addUser, it throws "Message processing model…
1
vote
1 answer

SNMP4J: Can't get SNMPv3 to work with multiple targets

I'm trying to use SNMP4J (v2.6.2) to query (snmpget) two different target machines at once. I've tried two approaches, and it always only receives a response for the first target. Whichever one I query second never gets a response. (I can query…
Timothy Miller
  • 1,527
  • 4
  • 28
  • 48
1
vote
1 answer

How to implement binary (b) variables in snmp4j

I am trying to port an snmpset command to snmp4j but am getting a error code 5 generic error which doesn't tell me much. The variable type is b (binary). I looked at the end all of examples the SnmpRequest.java source and found that b arguments are…
Jeff Gaer
  • 351
  • 3
  • 21
1
vote
2 answers

Sending OID in SNMP Trap header

I have a java application which sends SNMP traps using SNMP4J. The problem is that OID is sent in trap body. All data I'm setting is successfully sent, but in trap body. I want Oid to be sent in trap header. How can I send Oid in Trap header? …
JiboOne
  • 1,438
  • 4
  • 22
  • 55
1
vote
1 answer

Snmp trap receiver as a custom processor in Apache Nifi

Objective:- Looking for an option to use SNMP trap receiving mechanism as a custom processor in Apache Nifi. Looked at references like how to create a custom processor in Nifi (Apache docs and youtube videos), Nifi Source code of GetSNMP (including…
Raghu I
  • 45
  • 7
1
vote
0 answers

Retrieving target IP address from PDU Packet using SNMP4J

I had problem in retrieving the target ip address from received pdu. The "getPeerAddress()" gave me the sender's ip address. But what I want is the ip iddress or host name in the command/received pdu. Eg "10.255.255.221" from snmpset -v 1 -c M…
Reggie
  • 49
  • 10
1
vote
2 answers

SNMP4J V3 Trap with AuthPriv not processing

I'm trying to create a SNMP TRAP/Notify agent in Java using SNMP4J. The traps/notify's are meant to be sent to a remote listener. I'd like to add support for V2 and V3 traps with authentication. My setup currently: Dev machine running the…
1
vote
2 answers

Mapping SNMP ASN.1 to C++ Datatypes

I am adding SNMP EtherLike MIB variables to our existing SNMP C++ codebase and doing it for very first time. The difficulty I am facing is understanding the data types of MIB variables and map it to C++ data types - for example dot3StatsIndex MIB…
Programmer
  • 8,303
  • 23
  • 78
  • 162
1
vote
1 answer

How can I get my Application bound to port 161?

I'm working on a Java Project where I need to Simulate a Printer. Clients of the Printer send SNMP messages to the Printer. Printer should have SNMP Agent running on port 161. Since, port 161 is a well known port, I'm unable to use that port. How…
vineeth kumar
  • 175
  • 1
  • 12
1
vote
0 answers

How to get response of snmptrap v2 with private mib

the private mib is define as below: 1.3.6.1.4.1.49763.1.2.5 userTrap NOTIFICATION-TYPE OBJECTS{ userName, userType, userStatus } STATUS current DESCRIPTION "Traps of user operation" ::={stationTrap 2} My code is supported by SNMP4J as below…
MR.chen
  • 11
  • 3
1
vote
2 answers

SNMP4J General Variable Binding Error

I am trying to use SNMP4J to do a SNMP bulkget. When ever I use SNMP4J to make the call I get returned a responseEvent error that says "General Variable Binding error" and the data returned is equal to Null. To debug: I print out, to the console,…
Brent
  • 303
  • 3
  • 11
1
vote
1 answer

SNMP4J How Mock a GETBULK Request?

I need to mock a GETBULK request with snmp4j in java. But I don't understand how to do it. More specific i don't understand how create TreeEvent for create response List and how answer to client. I've a snmpwalk like this public void sendWalk(String…
FiliRnd
  • 41
  • 5
1
vote
1 answer

Raising/Clearing SNMP alarm best practices

I am currently having an application where SNMP ALARMS are raised when my program is not able to reach an external API. I clear the alarm when ever i am successfully getting a response back from the API . Below is the code for the same . …
suvankar bose
  • 291
  • 2
  • 12