OpenDJ lets you monitor the server over the Simple Network Management Protocol (SNMP), with support for the Management Information Base described in RFC 2605: Directory Server Monitoring MIB.
OpenDJ SNMP-based monitoring depends on OpenDMK, which you must download separately. OpenDJ directory server that you download from GitHub is built with OpenDMK, but due to licensing OpenDMK is not part of OpenDJ. SNMP is therefore not enabled by default.
To run the OpenDMK installer, use the self-extracting .jar.
$ java -jar ~/Downloads/opendmk-1.0-b02-*.jar
If you install under /path/to, then the runtime
library needed for SNMP is
/path/to/OpenDMK-bin/lib/jdmkrt.jar.
Once you have installed OpenDMK, you can set up a connection handler
for SNMP by enabling the connection handler, and pointing OpenDJ to your
installation of the OpenDMK jdmkrt.jar library.
$ dsconfig set-connection-handler-prop --port 4444 --hostname opendj.example.com --bindDN "cn=Directory Manager" --bindPassword password --handler-name "SNMP Connection Handler" --set enabled:true --set opendmk-jarfile:/path/to/OpenDMK-bin/lib/jdmkrt.jar --trustAll --no-prompt
By default, the SNMP Connection Handler listens on port 161 and uses port 162 for traps. On UNIX and Linux systems, only root can normally open these ports. Therefore if you install as a normal user, you might want to change the listen and trap ports.
$ dsconfig set-connection-handler-prop --port 4444 --hostname opendj.example.com --bindDN "cn=Directory Manager" --bindPassword password --handler-name "SNMP Connection Handler" --set listen-port:11161 --set trap-port:11162 --trustAll --no-prompt
Restart the SNMP Connection Handler to take the port number changes into account.
To restart the connection handler, you disable it, then enable it again.
$ dsconfig set-connection-handler-prop --port 4444 --hostname opendj.example.com --bindDN "cn=Directory Manager" --bindPassword password --handler-name "SNMP Connection Handler" --set enabled:false --trustAll --no-prompt $ dsconfig set-connection-handler-prop --port 4444 --hostname opendj.example.com --bindDN "cn=Directory Manager" --bindPassword password --handler-name "SNMP Connection Handler" --set enabled:true --trustAll --no-prompt
Use a command such as snmpwalk to check that the SNMP listen port works.
$ snmpwalk -v 2c -c OpenDJ@OpenDJ localhost:11161 SNMPv2-SMI::mib-2.66.1.1.1.1 = STRING: "OpenDJ 4.8.1-SNAPSHOT..." SNMPv2-SMI::mib-2.66.1.1.2.1 = STRING: "/path/to/opendj" ...

