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’s 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"
Note
- Adjust the jmx-port according to the jmx port used.
- jmx-port is mandatory to enable remote JMX.
Validate
Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.
Metrics
OpsRamp Metric | Metric Display Name | Unit | Description |
---|---|---|---|
solr_CACHE_cumulative_evictions | Cache Cumulative Evictions | eviction | Total number of cumulative evictions |
solr_CACHE_cumulative_hits | Cache Cumulative Hits | hits | Total number of cumulative hits |
solr_CACHE_cumulative_inserts | Cache Cumulative Inserts | inserts | Total number of cumulative inserts |
solr_CACHE_cumulative_lookups | Cache Cumulative Lookups | lookups | Total number of cumulative lookups |
solr_QUERY_requestTimes_MeanRate | Query Request times Mean rate | req/sec | Total number of search handler avg requests per second |
solr_QUERY_requestTimes_Mean | Query Request times Mean | seconds | Total number of search handler avg time |
solr_QUERY_errors | Query Errors | errord | Total number of search handler errors |
solr_QUERY_requests | Query Requests | requests | Total number of search handler requests |
solr_QUERY_totalTime | Query Total time | seconds | Total number of search handler totaltime |
solr_QUERY_timeouts | Query Timeouts | Total number of search handler timeouts | |
solr_searcher_maxDoc | Searcher Max doc | number of maxdoc | |
solr_searcher_numDocs | Searcher Numdocs | number of numdocs | |
solr_searcher_warmupTime | Searcher Warm uptime | seconds | Time spent warming up. |
solr_documentCache_cumulative_evictions | Documentcache Cumulative Evictions | eviction | Total number of documentcache cumulative evictions |
solr_documentCache_cumulative_inserts | Documentcache Cumulative Inserts | inserts | Total number of documentcache cumulative inserts |
solr_documentCache_cumulative_lookups | Documentcache Cumulative Lookups | lookups | Total number of documentcache cumulative lookups |
solr_documentCache_cumulative_hits | Documentcache Cumulative Hits | hits | Total number of documentcache cumulative hits |
solr_filterCache_cumulative_hits | Filtercache Cumulative Hits | hits | Total number of filtercache cumulative hits |
solr_filterCache_cumulative_lookups | Filtercache Cumulative Lookups | lookups | Total number of filtercache cumulative lookups |
solr_filterCache_cumulative_evictions | Filtercache Cumulative Evictions | inserts | Total number of filtercache cumulative evections |
solr_filterCache_cumulative_inserts | Filtercache Cumulative Inserts | inserts | Total number of filtercache cumulative inserts |
solr_queryResultCache_cumulative_inserts | Queryresultcache Cumulative Inserts | inserts | Total number of query result cache cumulative inserts |
solr_queryResultCache_cumulative_evictions | Queryresultcache Cumulative Evictions | eviction | Total number of query result cache cumulative evections |
solr_queryResultCache_cumulative_hits | Queryresultcache Cumulative Hits | hits | Total number of query result cache cumulative hits |
solr_queryResultCache_cumulative_lookups | Queryresultcache Cumulative Lookups | lookups | Total number of query result cache cumulative lookups |