Apache Solr is a popular, open source enterprise search platform from the Apache Lucene project. Powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, rich document handling (For example, Word and PDF), and geospatial search are some of the features of Apache Solr. Solr is highly scalable, providing distributed search and index replication, and it powers the search and navigation features of many of the world largest internet sites.
Solr is written in Java and runs as a standalone full-text search server within a servlet container such as Jetty.
Prerequisites
- Ensure that following variable is initialized:
export ENABLE_REMOTE_JMX_OPTS=true
- In the bin folder, add the following lines and start Solr:
REMOTE_JMX_OPTS=('-Dcom.sun.management.jmxremote' \
'-Dcom.sun.management.jmxremote.local.only=false' \
'-Dcom.sun.management.jmxremote.ssl=false' \
'-Dcom.sun.management.jmxremote.authenticate=false' \
"-Dcom.sun.management.jmxremote.port=$RMI_PORT" \
"-Dcom.sun.management.jmxremote.rmi.port=$RMI_PORT")
- For Virtual Machines, install the Linux Agent.
Configuring the credentials
Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml
solr:
- name: solr
user: <username>
pwd: <Password>
encoding-type: plain
labels:
key1: val1
key2: val2
Configuring the application
Virtual machine
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml
- name: solr
instance-checks:
process-check:
- solr
port-check:
- 8983
uri-check:
- "/solr"
mon-type: "jmx"
misc:
jmx-port: "7199"
Docker environment
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml
- name: solr
container-checks:
image-check:
- solr
port-check:
- 8983
mon-type: "jmx"
misc:
jmx-port: "7199"
Kubernetes environment
Configure the application in config.yaml
- name: solr
container-checks:
image-check:
- solr
port-check:
- 8983
mon-type: "jmx"
misc:
jmx-port: "7199"
- Adjust the jmx-port according to the jmx port used.
- jmx-port is required to enable remote JMX.
Validate
Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.
Supported metrics
OpsRamp Metric | Metric Display Name | Unit |
---|---|---|
solr_CACHE_cumulative_evictions Total number of cumulative evictions | Cache Cumulative Evictions | eviction |
solr_CACHE_cumulative_hits Total number of cumulative hits | Cache Cumulative Hits | hits |
solr_CACHE_cumulative_inserts Total number of cumulative inserts | Cache Cumulative Inserts | inserts |
solr_CACHE_cumulative_lookups Total number of cumulative lookups | Cache Cumulative Lookups | lookups |
solr_QUERY_requestTimes_MeanRate Total number of search handler avg requests per second | Query Request times Mean rate | req/sec |
solr_QUERY_requestTimes_Mean Total number of search handler avg time | Query Request times Mean | seconds |
solr_QUERY_errors Total number of search handler errors | Query Errors | errord |
solr_QUERY_requests Total number of search handler requests | Query Requests | requests |
solr_QUERY_totalTime Total number of search handler totaltime | Query Total time | seconds |
solr_QUERY_timeouts Total number of search handler timeouts | Query Timeouts | |
solr_searcher_maxDoc number of maxdoc | Searcher Max doc | |
solr_searcher_numDocs number of numdocs | Searcher Numdocs | |
solr_searcher_warmupTime Time spent warming up. | Searcher Warm uptime | seconds |
solr_documentCache_cumulative_evictions Total number of documentcache cumulative evictions | Documentcache Cumulative Evictions | eviction |
solr_documentCache_cumulative_inserts Total number of documentcache cumulative inserts | Documentcache Cumulative Inserts | inserts |
solr_documentCache_cumulative_lookups Total number of documentcache cumulative lookups | Documentcache Cumulative Lookups | lookups |
solr_documentCache_cumulative_hits Total number of documentcache cumulative hits | Documentcache Cumulative Hits | hits |
solr_filterCache_cumulative_hits Total number of filtercache cumulative hits | Filtercache Cumulative Hits | hits |
solr_filterCache_cumulative_lookups Total number of filtercache cumulative lookups | Filtercache Cumulative Lookups | lookups |
solr_filterCache_cumulative_evictions Total number of filtercache cumulative evections | Filtercache Cumulative Evictions | inserts |
solr_filterCache_cumulative_inserts Total number of filtercache cumulative inserts | Filtercache Cumulative Inserts | inserts |
solr_queryResultCache_cumulative_inserts Total number of query result cache cumulative inserts | Queryresultcache Cumulative Inserts | inserts |
solr_queryResultCache_cumulative_evictions Total number of query result cache cumulative evections | Queryresultcache Cumulative Evictions | eviction |
solr_queryResultCache_cumulative_hits Total number of query result cache cumulative hits | Queryresultcache Cumulative Hits | hits |
solr_queryResultCache_cumulative_lookups Total number of query result cache cumulative lookups | Queryresultcache Cumulative Lookups | lookups |