AppDynamics Monitoring Extension for use with Solr

AppDynamics Monitoring Extension for use with

AppDynamics Monitoring Extension for use with Solr

Use Case

Solr is a popular open source enterprise search platform from the Apache Lucene project.
Its major features include powerful full-text search, hit highlighting, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search.
This extension collects metrics from the Solr search engine and uploads them to the AppDynamics Metric Broswer.

Solr statistics (Core, Query, Cache) are obtained through an HTTP request to the SolrInfoMBeanHandler at http://<host>:<port>/solr/admin/mbeans. Please refer to SolrInfoMBeanHandler for details.

Memory statistics are collected through an HTTP request SystemInfoHandler at http://<host>:<port>/solr/admin/system


  1. 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.
  2. The extension needs to be able to connect to Solr in order to collect and send metrics. To do this, you will have to either establish a remote connection in between the extension and the product, or have an agent on the same machine running the product in order for the extension to collect and send the metrics.


  1. Download and unzip the to the “<MachineAgent_Dir>/monitors” directory
  2. Configure the extension by referring to the below section.
  3. All metrics to be reported are configured in metrics.xml. Users can remove entries from metrics.xml to stop the metric from reporting.
  4. Restart the Machine Agent

Please place the extension in the “monitors” directory of your Machine Agent installation directory. Do not place the extension in the “extensions” directory of your Machine Agent installation directory.

In the AppDynamics Metric Browser, look for: Application Infrastructure Performance | <Tier> | Custom Metrics | Solr for default metric-path.


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/SolrMonitor and update the Solr server(s) details. 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 Solr instances by specifying the name(required), host(required), port(required) and collectionName(required) of the Solr instance, and rest of the fields (only if authentication enabled),
    encryptedPassword(only if password encryption required). You can configure multiple instances as follows to report metrics
    For example,

       # mandatory parameters
      - host: "localhost"
        port: 8983
        name: "Server 1"
        collectionName : ["gettingStarted","techproducts"]
      - host: "localhost"
        port: 7574
        name: "Server 2"
        collectionName : ["gettingStarted","techproducts"]
    1. Configure the encyptionKey for encryptionPasswords(only if password encryption required).
      For example,
       #Encryption key for Encrypted password.
       encryptionKey: "axcdde43535hdhdgfiniyy576"
    1. Configure the numberOfThreads
      For example,
      If number of servers that need to be monitored is 3, then number of threads required is 5 * 3 = 15
       numberOfThreads: 15

Specify as many cores as you want to monitor and corresponding comma separated request handlers. If none of the cores are specified, default core with empty request handlers is monitored.
The Solr extension now includes support for multiple instances. You can specify as many servers as you want.

  1. Configure the path to the config.yml and metrics-vX.xml files by editing the <task-arguments> in the monitor.xml file in the <MACHINE_AGENT_HOME>/monitors/SolrMonitor/ directory. Below is the sample

        <!-- config file-->
        <argument name="config-file" is-required="true" default-value="monitors/SolrMonitor/config.yml" />
        <argument name="metric-file-v5" is-required="true" default-value="monitors/SolrMonitor/metrics-v5.xml"/>
        <argument name="metric-file-v7" is-required="true" default-value="monitors/SolrMonitor/metrics-v7.xml"/>

Note: Solr has had a change of API’s over the past few versions due to which this extension ships with two files,
metrics-v5.xml and metrics-v7.xml which contain the names of metrics to retrieve from Solr’s APIs.
The extension automatically checks for what version of Solr you are on and based on that selects a metrics.xml file
to pull the metrics. If you have multiple Solr servers where some are greater than v7 whereas some are less than v7,
we suggest you use two copies of the extension, with one version having servers greater than v7 and one with less
than v7 as the APIs changed at v7.


By default, the metrics will be reported under the following metric tree:
Application Infrastructure Performance|Custom Metrics|Solr Monitor|$SERVERNAME

This will register metrics to all tiers within the application. We strongly recommend using the tier specific metric prefix so that metrics are reported only to a specified tier. Please change the metric prefix in your config.yaml

metricPrefix: "Server|Component:<TierID>|Custom Metrics|Solr Monitor|"

For instructions on how to find the tier ID, please refer to the Metric Path subsection here.

Metrics will now be seen under the following metric tree:

Application Infrastructure Performance|$TIER|Custom Metrics|$SERVERNAME|Solr Monitor

The following metrics are available for each core under Cores

Core Metrics

The following metrics are reported under CORE

Metric Name
Number of Docs
Max Docs
Deleted Docs
Query Statistics

The following metrics are reported under QUERYHANDLER for SearchHandler and UpdateHandler

Metric Name
Average Requests Per Minute
Average Requests Per Second
5 min Rate Requests Per Minute
Average Time Per Request (milliseconds)
Memory Statistics

The following metrics are reported under MEMORY/JVM

Metric Name
Used (MB)
Free (MB)
Total (MB)

The following metrics are reported under MEMORY/System

Metric Name
Free Physical Memory (MB)
Total Physical Memory (MB)
Committed Virtual Memory (MB)
Free Swap Size (MB)
Total Swap Size (MB)
Open File Descriptor Count
Max File Descriptor Count
Cache Statistics

The following metrics are reported under Cache /QueryResultCache

Metric Name
HitRatio %
HitRatioCumulative %
CacheSize (Bytes)

The following metrics are reported under Cache/DocumentCache

Metric Name
HitRatio %
HitRatioCumulative %
CacheSize (Bytes)

The following metrics are reported under Cache/FieldValueCache

Metric Name
HitRatio %
HitRatioCumulative %
CacheSize (Bytes)

The following metrics are reported under Cache/FilterCache

Metric Name
HitRatio %
HitRatioCumulative %
CacheSize (Bytes)
Credentials Encryption

Please visit this page to get detailed instructions on password encryption. The steps in this document will guide you through the whole process.

Extensions Workbench

Workbench is an inbuilt feature provided with each extension in order to assist you to fine tune the extension setup before you actually deploy it on the controller. Please review the following document on How to use the Extensions WorkBench


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

Support Tickets

If after going through the Troubleshooting Document you have not been able to get your extension working, please file a ticket and add the following information.

Please provide the following in order for us to assist you better.

1. Stop the running machine agent.
2. Delete all existing logs under <MachineAgent>/logs.
3. Please enable debug logging by editing the file <MachineAgent>/conf/logging/log4j.xml. Change the level value of the following <logger> elements to debug.
    <logger name="com.singularity">
    <logger name="com.appdynamics">
4. Start the machine agent and please let it run for 10 mins. Then zip and upload all the logs in the directory <MachineAgent>/logs/*.
5. Attach the zipped <MachineAgent>/conf/* directory here.
6. Attach the zipped <MachineAgent>/monitors/ExtensionFolderYouAreHavingIssuesWith directory here.

For any support related questions, you can also contact


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

Extension Version1.2.3
Controller Compatibility3.7 or Later
Product Tested On7.2.1, 5.5
Last Update2/26/2019