Project Java Article

Solr 5 NewRelic Configuration

Indexing special terms can tricky in Solr. Is that period the end of a sentence, or the start of a technology name? Continue reading to see how to tell the difference and provide stellar, fast solr search results to your customers.

Solr 5 NewRelic Configuration

Solr 5 comes with a great new feature to install as a Linux service.  If you previously ran Solr4 under Tomcat or other Java container, and you used NewRelic for application performance monitoring, you might be wondering the best way to include the NewRelic Java agent with your new Solr 5 service.

Assuming the default location of your Solr service installation is /var/solr, perform the following steps to start monitoring Solr in NewRelic.

Solr 5 NewRelic Instructions

  1. Login to NewRelic and click on your "Profile" -> "Account Settings".
  2. Download the NewRelic zip archive from your NewRelic Account for the correct JVM version you are using.  This is available for download with your license key already present in the newrelic.yml file.
  3. unzip the archive into /var/solr which will create a /newrelic directory.
  4. cd /var/solr/newrelic
  5. Edit the newrelic.yml file and set the "app_name" value, like "app_name: Solr 5"
  6. cd /var/solr
  7. Edit the file and go to the section for SOLR_OPTS and add this line
    • SOLR_OPTS="$SOLR_OPTS -javaagent:/var/solr/newrelic/newrelic.jar"
  8. Restart the Solr service and you should see metrics in NewRelic after just a few minutes.
    • service solr restart

Ready To Get Started

Whether you need help configuring your Java App container connection pool, or require the delivery of a fully functional Solr core, the staff at Prowave Consulting can assist with 1% or 100% of your development needs. Our flexible service offering can work within your framework, from acting as a consulting arm to your development team to providing a statement of work to develop and implement an entire production environment for your organization. For help or to schedule a consultation, we can be reached at 904-302-7734 or by using our Contact Form.

Request For Services

Please fill out the form below and we will get back to you soon.