Docs » Integrations Guide » Integrations Reference » Apache Solr

image0 Apache Solr

Metadata associated with the solr plugin for collectd can be found here. The relevant code for the plugin can be found here.

DESCRIPTION

This is the SignalFx solr plugin. Follow these instructions to install the solr plugin for collectd.

The solr-collectd plugin collects metrics from solr instances hitting these endpoints: statistics (default metrics) and metrics (optional metrics).

FEATURES

Built-in dashboards

  • SOLR CLUSTER: Provides a high-level overview of metrics for a single solr cluster.

image1

image2

  • SOLR COLLECTION: Provides metrics from a single solr collection.

image3

  • SOLR NODE: Provides metrics from a single solr instance/node.

image4

  • SOLR NODES: Provides metrics from nodes on a particular host.

image5

REQUIREMENTS AND DEPENDENCIES

Version information

Software Version
collectd 4.9 or later
python 2.6 or later
solr 6.6 or later
Python plugin for collectd (included with SignalFx collectd agent)

INSTALLATION

  1. Download collectd-solr. Place the solr_collectd.py file in /usr/share/collectd/collectd-solr
  2. Modify the sample configuration file for this plugin to /etc/collectd/managed_config
  3. Modify the sample configuration file as described in Configuration, below
  4. Install the Python requirements with sudo pip install -r requirements.txt
  5. Restart collectd

CONFIGURATION

Using the example configuration file 20-solr.conf as a guide, provide values for the configuration options listed below that make sense for your environment and allow you to connect to the solr nodes

configuration option definition example value
ModulePath Path on disk where collectd can find this module. “/usr/share/collectd/collectd-solr/”
Host Host name of the solr node “localhost”
Port Port at which the node can be reached “8983”
Cluster Name of this solr cluster. “demo”
EnhancedMetrics Boolean to indicate whether stats from /metrics are needed “false”
IncludeMetric Metric name from the /admin/metrics endpoint to include(valid when EnhancedMetrics is “false”) “”
ExcludeMetric Metric name from the /admin/metrics endpoint to exclude(valid when EnhancedMetrics is “true”) “”
Dimension Space-separated key-value pair for a user-defined dimension dimension_name dimension_value
Interval Number of seconds between calls to solr API. 10
ssl_keyfile Path to the keyfile “path/to/file”
ssl_certificate Path to the certificate “path/to/file”
ssl_ca_certs Path to the ca file “path/to/file”

Example configuration:

LoadPlugin python
<Plugin python>
  ModulePath "/usr/share/collectd/collectd-solr/"

  Import solr_plugin
  <Module solr_plugin>
    Host "localhost"
    Port "8983"
    Interval 10
    Cluster "prod"
    Dimension dimension_name dimension_value
    EnhancedMetrics False
    IncludeMetric metric_name_from_metrics_endpoint
    ssl_keyfile "/Users/as001/work/play/solr/solr-ca/solr-ca/private/solr-client.key"
    ssl_certificate "/Users/as001/work/play/solr/solr-ca/solr-ca/certs/solr-client.crt"
    ssl_ca_certs "/Users/as001/work/play/solr/solr-ca/solr-ca/certs/ca.crt"
  </Module>
</Plugin>

The plugin can be configured to collect metrics from multiple nodes in the following manner.

LoadPlugin python

<Plugin python>
  ModulePath "/usr/share/collectd/collectd-solr/"
  Import solr_plugin
  <Module solr_plugin>
    Host "localhost"
    Port "8983"
    Interval 10
    Cluster "prod"
  </Module>
  <Module solr_plugin>
    Host "localhost"
    Port "7574"
    Interval 10
    Cluster "prod"
    IncludeMetric "metrics.solr.node.ADMIN./admin/zookeeper.serverErrors.meanRate"
    IncludeMetric "metrics.solr.jetty.org.eclipse.jetty.server.handler.DefaultHandler.post-requests.count"
  </Module>
  <Module solr_plugin>
    Host "localhost"
    Port "8984"
    Interval 10
    Cluster "test"
  </Module>
</Plugin>

USAGE

Interpreting Built-in dashboards

  • SOLR CLUSTER:
  • Number of Collections: Shows the number of collections in the cluster.

image6

  • Number of Nodes: Shows the number of nodes in the cluster.

image7

  • Index Size per Collection: Shows the total index size by collection for all the collections in the cluster.

image8

  • Document Cache Hit Ratio: Shows the cumulative document cache hit ration for all collections in the cluster.

image9

  • Query Result Cache Hit Ratio: Shows the cumulative query result cache hit ration for all collections in the cluster.

image10

  • Overall Heap Usage: Shows the average, minimum, maximum, percentile distribution heap usage of the cluster.

image11

  • GC Invocations: Shows the mean parnew & cms GC invocations over last minute in the cluster.

image12

  • Search Request Latency: Shows the average time taken to process a search request in the cluster.

image13

  • SOLR COLLECTION:
  • Number of Documents: Shows the number of documents in the collection.

image14

  • Number of Shards: Shows the number of shards & cores per shard in the collection.

image15

  • Documents Growth: Shows growth in the number of documents in the collection.

image16

  • Overall Cache Hit Ratio: Shows the various caches cumulative hit ratio in the collection.

image17

  • SOLR NODE:
  • Number of Cores: Shows the number of cores in the node.

image18

  • Cores by Indexed Documents: Shows the top cores by number of indexed documents in the node.

image19

  • Http Request Latency: Shows the response time of http requests to the cores in the node.

image20

  • JVM Memory Pools Usage: Shows the usage of JVM memory pools.

image21

  • SOLR NODES:
  • Number of Nodes: Shows the total number of Solr nodes monitored in the org.

image22

  • Number of Cores Heatmap: Shows the total number of cores in heapmap for each node.

image23

  • Http response time: Shows the http response time of each node.

image24

  • Number of Requests: Shows the number of requests for each node.

image25

A few other details:

  • plugin is always set to solr
  • plugin_instance will contain the IP address and the port of the node given in the configuration
  • To add metrics from the /admin/metrics endpoint, use the configuration options mentioned in configuration. If metrics are being included individually, make sure to give names that are valid.

METRICS

By default, metrics about a collection, shard and core are provided. Note, that SignalFx does not support histogram and summary metric types (hence, metrics of these will be skipped if provided in the configuration). See usage for details.

Metric naming

<metric type>.solr.<endpoint name>.<name of metric>. This is the format of default metric names reported by the plugin. Optional metrics are named as available from the /metrics endpoint with _ replaced by ..

Below is a list of all metrics.

Metric Name Brief Type
solr.core_deleted_docs Number of deleted docs in Solr core gauge
solr.core_index_size Size of a core index gauge
solr.core_max_docs Total number of docs in Sor core gauge
solr.core_num_docs Total number of indexed docs in Sor core gauge
solr.core_totalspace Total space allocated for core gauge
solr.core_usablespace Usable space available in core gauge
solr.document_cache_cumulative_hitratio Cummulative hit ration of document cache gauge
solr.field_value_cache_cumulative_hitratio Cummulative hit ration of filed value cache gauge
solr.http_2xx_responses Total number of 2xx http responses counter
solr.http_4xx_responses Total number of 4xx http responses counter
solr.http_5xx_responses Total number of 5xx http responses counter
solr.http_active_requests Number of http active requests gauge
solr.jetty_get_request_latency Time to process http get request gauge
solr.jetty_post_request_latency Time to process http post request gauge
solr.jetty_request_latency Http request response time gauge
solr.jvm_classes_loaded Number of JVM classes loaded counter
solr.jvm_gc_cms_count JVM Garbage Collector - CMS invocation count gauge
solr.jvm_gc_cms_time JVM Garbage Collector - CMS prcoess time gauge
solr.jvm_gc_parnew_count JVM Garbage Collector - Parnew invocation count gauge
solr.jvm_gc_parnew_time JVM Garbage Collector - Parnew process time gauge
solr.jvm_heap_usage JVM Heap usage gauge
solr.jvm_mapped_memory_capacity Total JVM mapped memory capacity gauge
solr.jvm_mapped_memory_used Total JVM mapped memory used gauge
solr.jvm_memory_pools_Code-Cache_usage JVM memory pools - PCode Cache usage gauge
solr.jvm_memory_pools_Metaspace_usage JVM memory pools - Metaspace usage gauge
solr.jvm_memory_pools_Par-Eden-Space_usage JVM memory pools - Par Eden space usage gauge
solr.jvm_memory_pools_Par-Survivor-Space_usage JVM memory pools - Par Survivor space usage gauge
solr.jvm_total_memory JVM total memory allocated gauge
solr.jvm_total_memory_used JVM memory used gauge
solr.node_collections_requests Number of collection level requets to Solr node counter
solr.node_cores_requests Number of core level requets to Solr node counter
solr.node_metric_request_count Number of metric requests counter
solr.node_metric_request_time Time to process a metric request gauge
solr.node_metrics_requests Number of metrics level requets to Solr node counter
solr.node_zookeeper_requests Number of zookeeper level requets to Solr node counter
solr.openFileDescriptorCount Number of open file descriptors counter
solr.query_result_cache_cumulative_hitratio Cummulative hit ration of query cache gauge
solr.replication_handler_requests Number of replication handler requets counter
solr.replication_handler_response Resplication handler response time gauge
solr.search_query_requests Number of search query requests counter
solr.search_query_response Search query response time gauge
solr.searcher_warmup Time to new searcher to warm up gauge
solr.update_handler_requests Number of update handler requets counter
solr.update_request_handler_response Update request handler response time gauge
solr.zookeeper_errors Number of failures/error at Zookeeper counter
solr.zookeeper_request_time Time to process a request at zookeeper gauge

solr.core_deleted_docs

gauge

Number of deleted docs in Solr core

solr.core_index_size

gauge

Size of a core index

solr.core_max_docs

gauge

Total number of docs in Sor core

solr.core_num_docs

gauge

Total number of indexed docs in Sor core

solr.core_totalspace

gauge

Total space allocated for core

solr.core_usablespace

gauge

Usable space available in core

solr.document_cache_cumulative_hitratio

gauge

Cummulative hit ration of document cache

solr.field_value_cache_cumulative_hitratio

gauge

Cummulative hit ration of filed value cache

solr.http_2xx_responses

counter

Total number of 2xx http responses

solr.http_4xx_responses

counter

Total number of 4xx http responses

solr.http_5xx_responses

counter

Total number of 5xx http responses

solr.http_active_requests

gauge

Number of http active requests

solr.jetty_get_request_latency

gauge

Time to process http get request

solr.jetty_post_request_latency

gauge

Time to process http post request

solr.jetty_request_latency

gauge

Http request response time

solr.jvm_classes_loaded

counter

Number of JVM classes loaded

solr.jvm_gc_cms_count

gauge

JVM Garbage Collector - CMS invocation count

solr.jvm_gc_cms_time

gauge

JVM Garbage Collector - CMS prcoess time

solr.jvm_gc_parnew_count

gauge

JVM Garbage Collector - Parnew invocation count

solr.jvm_gc_parnew_time

gauge

JVM Garbage Collector - Parnew process time

solr.jvm_heap_usage

gauge

JVM Heap usage

solr.jvm_mapped_memory_capacity

gauge

Total JVM mapped memory capacity

solr.jvm_mapped_memory_used

gauge

Total JVM mapped memory used

solr.jvm_memory_pools_Code-Cache_usage

gauge

JVM memory pools - PCode Cache usage

solr.jvm_memory_pools_Metaspace_usage

gauge

JVM memory pools - Metaspace usage

solr.jvm_memory_pools_Par-Eden-Space_usage

gauge

JVM memory pools - Par Eden space usage

solr.jvm_memory_pools_Par-Survivor-Space_usage

gauge

JVM memory pools - Par Survivor space usage

solr.jvm_total_memory

gauge

JVM total memory allocated

solr.jvm_total_memory_used

gauge

JVM memory used

solr.node_collections_requests

counter

Number of collection level requets to Solr node

solr.node_cores_requests

counter

Number of core level requets to Solr node

solr.node_metric_request_count

counter

Number of metric requests

solr.node_metric_request_time

gauge

Time to process a metric request

solr.node_metrics_requests

counter

Number of metrics level requets to Solr node

solr.node_zookeeper_requests

counter

Number of zookeeper level requets to Solr node

solr.openFileDescriptorCount

counter

Number of open file descriptors

solr.query_result_cache_cumulative_hitratio

gauge

Cummulative hit ration of query cache

solr.replication_handler_requests

counter

Number of replication handler requets

solr.replication_handler_response

gauge

Resplication handler response time

solr.search_query_requests

counter

Number of search query requests

solr.search_query_response

gauge

Search query response time

solr.searcher_warmup

gauge

Time to new searcher to warm up

solr.update_handler_requests

counter

Number of update handler requets

solr.update_request_handler_response

gauge

Update request handler response time

solr.zookeeper_errors

counter

Number of failures/error at Zookeeper

solr.zookeeper_request_time

gauge

Time to process a request at zookeeper