Apache Solr Startup Settings

This page describes how to instrument Apache Solr with the Java Agent.

Instrument Solr in a Linux Environment

  1. Open a terminal.
  2. Execute the following commands to add the javaagent argument to the Solr server:
    >cd $Solr_Installation_Directory
    >java -javaagent:"<agent install directory>/javaagent.jar" -jar start.jar
    For the argument value, reference the full path to the Java Agent installation directory.

Instrument Solr in a Windows Environment

  1. Add the Java Agent to the Solr configuration file, solr.in.
    You can find the file at: <solr-install-dir>\bin\solr.in.
  2. Add the following line just below REM set SOLR_OPTS=%SOLR_OPTS%:
    set SOLR_OPTS=%SOLR_OPTS% -javaagent:"<java_agent_location>\javaagent.jar"
  3. Restart the Solr service.