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
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.
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
Configure the “tier” under which the metrics need to be reported. This can be done by changing the value of
<TIER ID> in
<TIER ID>|Custom Metrics|Solr”.
metricPrefix: "Server|Component:438|Custom Metrics|Solr"
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
servers: # mandatory parameters - host: "localhost" port: 8983 name: "Server 1" collectionName : ["gettingStarted","techproducts"] - host: "localhost" port: 7574 name: "Server 2" collectionName : ["gettingStarted","techproducts"]
#Encryption key for Encrypted password. encryptionKey: "axcdde43535hdhdgfiniyy576"
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.
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
<task-arguments> <!-- 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"/> </task-arguments>
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
The following metrics are reported under CORE
|Number of Docs|
The following metrics are reported under QUERYHANDLER for SearchHandler and UpdateHandler
|Average Requests Per Minute|
|Average Requests Per Second|
|5 min Rate Requests Per Minute|
|Average Time Per Request (milliseconds)|
The following metrics are reported under MEMORY/JVM
The following metrics are reported under MEMORY/System
|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|
The following metrics are reported under Cache /QueryResultCache
The following metrics are reported under Cache/DocumentCache
The following metrics are reported under Cache/FieldValueCache
The following metrics are reported under Cache/FilterCache
Please visit this page to get detailed instructions on password encryption. The steps in this document will guide you through the whole process.
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 follow the steps listed in this troubleshooting-document in order to troubleshoot your issue. These are a set of common issues that customers might have faced during the installation of the extension. If these don’t solve your issue, please follow the last step on the troubleshooting-document to contact the support team.
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 email@example.com.
Always feel free to fork and contribute any changes directly here on GitHub.
|Controller Compatibility||3.7 or Later|
|Product Tested On||7.2.1, 5.5|