This chapter describes how to start JEUS SNMP agent and how the SNMP client application retrieves monitoring information from JEUS.
Modify the SNMP client example program in "4.2. SNMP Client Program Sample" and compile it. In order to compile the example program, SNMP4j is required. You can download the SNMP4J API at www.snmp4j.org.
Refer to Configuration in "Chapter 2. SNMP Agent" to configure the SNMP Adaptor. The example uses port 9999 so set the SNMP Adapter port to '9999'.
Restart the server. If SNMP Adapter is in use, the following log appears.
. . . [2016.08.03 16:32:12][0] [adminServer-1] [SNMP-0004] The SNMP agent is ready using the port 9999. . . .
This example assumes the JEUS server name as ‘adminServer’.
Execute the example program created in step 1. Set the classpath to SNMP4J in order to run the program. This example assumes that SNMP4J is the file 'SNMP4J.jar' under the '/home/user1/lib' directory.
user1@host1:~/java -classpath /home/user1/lib/SNMP4J.jar SnmpclientSample
PORT : 9999
IP : 127.0.0.1
OID : 1.3.6.1.4.1.14586.100.2.1
1.3.6.1.4.1.14586.100.2.1.0 = [JEUS:JMXManager=adminServer,j2eeType=J2EEDomain,name=domain1]
This program is set to access the port number, 127.0.0.1:9999. In order to access a different address and port, provide parameter values for the port number and IP address when executing the program.