AppDynamics Monitoring Extension for use with MarkLogic

1. Use Case

MarkLogic is an operational and transactional Enterprise NoSQL database that is designed to integrate, store, manage, and search data. This extension fetches performance metrics from MarkLogic and reports to AppDynamics Controller.

Note: This extension requires a Java Machine agent.

2. Prerequisites

Before the extension is installed, the prerequisites mentioned here need to be met. Please do not proceed with the extension installation if the specified prerequisites are not met.

3. Installation

  1. Download and unzip
  2. Copy "MarkLogicMonitor" to <MACHINE_AGENT_HOME>/monitors directory.
  3. Configure the extension by following the below section and restart the Machine Agent.

4. Configuration

Note : Please make sure to not use tab (\t) while editing yaml files. You may want to validate the yaml file using a yaml validator

  1. Edit the file config.yml located at <MachineAgent_Dir>/monitors/ The metricPrefix of the extension has to be configured as specified here. Please make sure that the right metricPrefix is chosen based on your machine agent deployment, otherwise this could lead to metrics not being visible in the controller.
  2. Configure the MarkLogic instances by editing the config.yml file in <MACHINE_AGENT_HOME>/monitors/MarkLogicMonitor/by specifying the displayName, uri, username and password

    For eg.

        #This will create it in specific Tier/Component. Make sure to replace <COMPONENT_ID> with the appropriate one
        #from your environment. To find the <COMPONENT_ID> in your environment, please follow the screenshot in
        metricPrefix: Server|Component:<COMPONENT_ID>|Custom Metrics|MarkLogic
          - displayName: Server1
            uri: "http://localhost:8002"
            username: "admin"
            password: "password123"
            #passwordEncrypted: ""
        #encryptionKey: ""
          socketTimeout: 2000
          connectTimeout: 2000
        # number of concurrent tasks.
        # This doesn't need to be changed unless many instances are configured
        numberOfThreads: 5
  3. Configure the metrics you are interested in by commenting/uncommenting the metrics in metrics.xml file in <MACHINE_AGENT_HOME>/monitors/MarkLogicMonitor/.

5. WorkBench

Workbench is a feature that lets you preview the metrics before registering it with the controller. This is useful if you want to fine tune the configurations. Workbench is embedded into the extension jar. To use the workbench

  1. Follow all the installation steps
  2. Start the workbench with the command java -jar /path/to/MachineAgent/monitors/MarkLogicMonitor/marklogic-monitoring-extension.jar This starts an http server at http://host:9090/. This can be accessed from the browser.
  3. If the server is not accessible from outside/browser, you can use the following end points to see the list of registered metrics and errors. #Get the stats curl http://localhost:9090/api/stats #Get the registered metrics curl http://localhost:9090/api/metric-paths
  4. You can make the changes to config.yml and validate it from the browser or the API
  5. Once the configuration is complete, you can kill the workbench and start the Machine Agent

6. Metrics

This extension uses REST API to fetch metrics from MarkLogic server. Please refer to this screenshot for a view of metrics. Some of the metrics are listed below:

  1. Total Hosts - number of hosts in this cluster
  2. Disks Performance
    • Query Read Rate - The moving average of reading query data from disk
    • Journal Write Rate - The moving average of data writes to the journal.
    • Save Write Rate - The moving average of data writes to in-memory stands.
    • Merge Read Rate - The moving average of reading merge data from disk
    • Merge Write Rate - The moving average of writing data for merges
    • Backup Rate - The moving average of reading and writing backup data to disk.
    • Restore Rate - The moving average of reading and writing restore data from disk.
    • Large Read Rate - The moving average of reading large documents from disk.
    • Large Write Rate - The moving average of writing data for large documents to disk.
  3. Memory
    • System Page-In Rate - The page-in rate (from Linux /proc/vmstat) for the cluster in pages/sec.
    • System Page-Out Rate - The page-out rate (from Linux /proc/vmstat) for the cluster in pages/sec.
    • System Swap-In Rate - The swap-in rate (from Linux /proc/vmstat) for the cluster in pages/sec.
    • System Swap-Out Rate - The swap-out rate (from Linux /proc/vmstat) for the cluster in pages/sec.
  4. Server Performance
    • Request Rate - The total number of queries being processed per second, across all of the App Servers.
    • Expanded Tree Cache Hits/Misses - The number of times per second that queries could use (Hits) and could not use (Misses) the expanded tree cache.
    • Request Count
  5. Network Performance
    • XDQP Client Receive/Send Rate
    • XDQP Server Receive/Send Rate
    • XDQP Foreign Client Receive/Send Rate
    • XDQP Foreign Server Receive/Send Rate
  6. Database Performance
    • Read Lock Rate - The number of read locks set per second on each database.
    • Write Lock Rate - The number of write locks set per second on each database.
    • Deadlock Rate - The number of deadlocks per second on each database.
  7. Requests Summary
    • Total Requests
    • Update Count
    • Query Count
  8. Transactions Summary
    • Total Transactions

Note : By default, a Machine agent or a AppServer agent can send a fixed number of metrics to the controller. To change this limit, please follow the instructions mentioned here. For eg.

    java -Dappdynamics.agent.maxMetrics=2500 -jar machineagent.jar

7. Password Encryption Support

To avoid setting the clear text password in the config.yml, please follow the process to encrypt the password and set the passwordEncrypted and the encryptionKey in the config.yml

  1. Download the util jar to encrypt the password from here
  2. Encrypt password from the commandline
    java -cp "appd-exts-commons-1.1.2.jar" com.appdynamics.extensions.crypto.Encryptor encryptionKey password
  3. These values should be used in the passwordEncrypted and encryptionKey fields in config.yml instead of plain text password

8. Troubleshooting

Please look at the troubleshooting document and make sure that everything is followed correctly.

9. Contributing

Always feel free to fork and contribute any changes directly via GitHub.

10. Support

For any questions or feature request, please contact AppDynamics Support.