1. Run dsconfig and enter the LDAP/LDAPS connection parameters when prompted.
    $ bin/dsconfig
  2. On the Directory Proxy Server configuration main menu (Advanced Objects menu), enter the number corresponding to Custom Logged Stats.
  3. On the Custom Logged Stats menu, enter the number corresponding to Create a new Custom Logged Stats.
  4. Select the Stats Logger Plugin from the list if more than one is present on the system. If you only have one stats logger, press Enter to confirm that you want to use the existing plugin.
  5. Enter a descriptive name for the Custom Logged Stats. For this example, enter Memory Usage.
  6. From the monitor-objectclass property menu, enter the objectclass attribute to monitor. For this example, enter ds-memory-usage-monitor-entry. You can run ldapsearch using the base DN "cn=JVM Memory Usage,cn=monitor" entry to view the entry.
  7. Next, specify the attributes of the monitor entry that you want to log in the stats logger. In this example, enter total-bytes-used-by-memory-consumers, and then press Enter again to continue.
  8. Next, specify the type of statistics for the monitored attribute that will appear in the log file. In this example, enter the option for raw statistics as recorded by the logger.
  9. In the Custom Logged Stats menu, review the configuration. At this point, we want to set up a column name that lists the Memory Usage. Enter the option to change the column-name property.
  10. Next, we want to add a specific label for the column name. Enter the option to add a value, and then enter Memory Consumer Total (GB), and press Enter again to continue.
  11. Confirm that you want to use the column-name value that you entered in the previous step, and then press Enter to use the value.
  12. Next, we want to scale the Memory Consumer Totals by one gigabyte. On the Custom Logged Stats menu, enter the option to change the divide-value-by property.
  13. On the divide-value-by property menu, enter the option to change the value, and then enter 1073741824 (i.e., 1073741824 bytes = 1 gigabytes).
  14. On the Custom Logged Stats menu, review your configuration. When finished, enter f to save and apply the settings.
    >>>> Configure the properties of the Custom Logged Stats
     >>>> via creating 'Memory Usage' Custom Logged Stats
    
             Property                   Value(s)
             ---------------------------------------------------------------
        1)   description                -
        2)   enabled                    true
        3)   monitor-objectclass        ds-memory-usage-monitor-entry
        4)   include-filter             -
        5)   attribute-to-log           total-bytes-used-by-memory-consumers
        6)   column-name                Memory Consumer Total (GB)
        7)   statistic-type             raw
        8)   header-prefix              -
        9)   header-prefix-attribute    -
        10)  regex-pattern              -
        11)  regex-replacement          -
        12)  divide-value-by            1073741824
        13)  divide-value-by-attribute  -
        14)  decimal-format             #.##
        15)  non-zero-implies-not-idle  false
    
        ?)   help
        f)   finish - create the new Custom Logged Stats
        a)   hide advanced properties of the Custom Logged Stats
        d)   display the equivalent dsconfig arguments to create this object
        b)   back
        q)   quit
    
    Enter choice [b]:
    The Custom Logged Stats was created successfully

    When the Custom Logged Stats configuration change is completed, the new stats value should immediately show up in the Stats Logger output file.