snmp4j

RunTimeException in SNMP4J agent

北战南征 提交于 2021-01-07 03:27:39
问题 I have downloaded SNMP4J and I added it to buildpath of my project. Then I added some codes from http://shivasoft.in/blog/java/snmp/create-snmp-client-in-java-using-snmp4j/ and http://shivasoft.in/blog/java/snmp/creating-snmp-agent-server-in-java-using-snmp4j/ to check my agent. But now These strings printed in console: Exception in thread "main" java.lang.RuntimeException: java.net.BindException: Address already in use: Cannot bind at org.snmp4j.transport.TransportMappings

RunTimeException in SNMP4J agent

◇◆丶佛笑我妖孽 提交于 2021-01-07 03:24:18
问题 I have downloaded SNMP4J and I added it to buildpath of my project. Then I added some codes from http://shivasoft.in/blog/java/snmp/create-snmp-client-in-java-using-snmp4j/ and http://shivasoft.in/blog/java/snmp/creating-snmp-agent-server-in-java-using-snmp4j/ to check my agent. But now These strings printed in console: Exception in thread "main" java.lang.RuntimeException: java.net.BindException: Address already in use: Cannot bind at org.snmp4j.transport.TransportMappings

SNMP EventTime in Human Readable format in Java

假装没事ソ 提交于 2020-07-16 05:43:28
问题 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 readable format. The event time field received normally looks as follows for example: eventTime*SNMPv2-SMI::enterprises.193.183.4.1.4.5.1.7.0 = Hex-STRING: 07 DC 03 0C 12 15 2C 1F 2B 01 00 Can anyone tell me how I can convert the text '07 DC 03 0C 12 15

SNMP EventTime in Human Readable format in Java

元气小坏坏 提交于 2020-07-16 05:43:05
问题 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 readable format. The event time field received normally looks as follows for example: eventTime*SNMPv2-SMI::enterprises.193.183.4.1.4.5.1.7.0 = Hex-STRING: 07 DC 03 0C 12 15 2C 1F 2B 01 00 Can anyone tell me how I can convert the text '07 DC 03 0C 12 15

SNMP EventTime in Human Readable format in Java

人走茶凉 提交于 2020-07-16 05:42:07
问题 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 readable format. The event time field received normally looks as follows for example: eventTime*SNMPv2-SMI::enterprises.193.183.4.1.4.5.1.7.0 = Hex-STRING: 07 DC 03 0C 12 15 2C 1F 2B 01 00 Can anyone tell me how I can convert the text '07 DC 03 0C 12 15

SNMP4J - unable to make it run for SNMP V3 with SHA / AES 256

不羁岁月 提交于 2020-01-17 07:55:10
问题 I use SNMP4J (version 2.5.3) to launch SNMP queries on a target configured in SNMP V3. It works fine for all combinations of auth / priv protocols except for the privacy AES 256 protocol ! I can only get a null response. Here is the code : public static void main(String[] args) throws Exception { String targetAddress = "udp:10.2.1.41/161"; String userName = "mip_aes256"; OID authProtocol = AuthSHA.ID; String authPassphrase = "mip_user_AuthPassword"; OID privProtocol = PrivAES256.ID; String

Monitoring a JVM with SNMP

可紊 提交于 2020-01-14 19:05:54
问题 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 management.properties Compile the JVM-MANAGEMENT-MIB with mibcc and replace the mib.bin. With those steps, I think I'm good to try. So I made a java program with snmp4j and when I try to call an OID from the JVM mib, I have got an error Request timed out . The weird

How do you use asymmetric keys or certificate authentication in SNMP4J?

蹲街弑〆低调 提交于 2019-12-25 08:37:15
问题 I am working on a project that would like to be able to use certificates or keys as a method of authentication for SNMPv3. We are using the java library SNMP4J. During my research I have found that SNMP uses TLS/DTLS for message encryption and supposedly also for authentication. Source 1 | Source 2 | Source 3 Looking into the little documentation SNMP4J has, I found that it allows the usage of TLS certificates for encrypting traffic. But I am not sure how the authentication is done, if

how to send the priority (clear, major , fatal) also along with the trap

ぐ巨炮叔叔 提交于 2019-12-25 03:45:08
问题 How to send the priority (clear, major , fatal) also along with the trap we are sending from the java code. i have updated the mib file , but don't know how to use this. TrapDescWarn OBJECT-TYPE SYNTAX INTEGER { critical(1), major(2), informational(3), clear(4) } MAX-ACCESS read-only STATUS current DESCRIPTION "Warning from the payment interface" ::= { TrapDefs 10 } 来源: https://stackoverflow.com/questions/54247959/how-to-send-the-priority-clear-major-fatal-also-along-with-the-trap

Getting started with SNMP4J

混江龙づ霸主 提交于 2019-12-17 18:10:06
问题 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. 回答1: You can download the source code for SNMP4JAgent here: http://www.snmp4j.org/html/download.html The source code includes a sample agent -- look in the org.snmp4j.agent.example package for all of the related classes. http://www.snmp4j.org/agent/doc/org/snmp4j/agent/example/SampleAgent.html One