Monitoring using the LDAP SDK
You can use the monitoring API to retrieve monitor entries from the PingDirectoryProxy server and retrieve specific types of monitor entries.
For example, you can retrieve all monitor entries published by the server, and print the information contained in each using the generic API for accessing monitor entry data as follows.
for (MonitorEntry e : MonitorManager.getMonitorEntries(connection)) { System.out.println("Monitor Name: " + e.getMonitorName()); System.out.println("Monitor Type: " + e.getMonitorDisplayName()); System.out.println("Monitor Data:"); for (MonitorAttribute a : e.getMonitorAttributes().values()) { for (Object value : a.getValues()) { System.out.println(" " + a.getDisplayName() + ": " + String.valueOf(value)); } } System.out.println(); }
For more information about the LDAP SDK and the methods in this example, see the LDAP SDK repository on GitHub.