How Does eG Enterprise Monitor Apache Solr?

eG Enterprise employs both agent-based and agentless approach to monitor the Apache Solr server. For agentless monitoring of Apache Solr server, the eG agent should be deployed on a remote Windows host in the environment. For agent-based monitoring, make sure that the eG agent is deployed on the Apache Solr server being monitored.

eG Enterprise uses Java Management Extensions (JMX) and REST API to connect to target Apache Solr server and collect relevant metrics.

Pre-requisites for Monitoring Apache Solr using eG Enterprise

To enable JVM metrics on Windows -

  • Locate\bin\solr.in.cmd file and then check whether the JMX port is configured or not, as shown below:

REM Set to true to activate the client applications connector to allow remote JMX client applications

REM to mon hosting Sol r; set to "false" to disable that the behavior

REM (false is recommended in production environments)

REM set ENABLE REMOTE JMX_OPTS=false

set ENABLE REMOTE JMX_OPTS=true

REM The script will use SOLR_PORT+1000 for the RMI_PORT or you can set it here

REM set RMI_PORT=18983

set RMI_PORT=18983

  • If not add the comment:

set ENABLE_REMOTE_JMX_OPTS=true

set RMI_PORT=18983

  • Start Solr server using command below:

bin>solr start

To enable JVM metrics on Linux:

  • Locate /bin/solr.in.sh file and check whether the JMX port is configured or not as shown below:

# Set to true to activate the JMX RMI connector to allow remote JMX client applications

# To monitor the JVM hosting Solr; set to "false" to disable the behavior

# (false is recommended in production environments)

ENABLE_REMOTE_JMX_OPTS="true"

# The script will use SOLR_PORT+1000 for the RMI_PORT or you can set it here

#RMI_PORT=18983

  • If not add the comment:

set ENABLE_REMOTE_JMX_OPTS=true

set RMI_PORT=18983

  • Start Solr server using command below:

bin>solr start

 

By default, the eG agent uses JMX for monitoring the Apache Solr server, and this JMX requires authentication only (and not security). Therefore, every test to be executed by the eG agent should be configured with the credentials of a valid user to JMX, with read-write rights. The steps for creating such a user are detailed below:

  1. Login to the application host. If the application being monitored is on a Windows host, then login as a local/domain administrator to the host.

  2. Go to /bin/ directory and view the following files:

    • jmxremote.access

    • jmxremote.password.template

  3. Copy jmxremote.password.template file to different location, rename it to jmxremote.password and copy it back to bin folder.

  4. Create a new username password pair in the jmxremote.password file, assign readwrite rights to this user in the jmxremote.access file, and then configure the eG tests with the credentials of this new user. For instance, let us create a user john with password john and assign readwrite rights to john.

  5. Save the jmxremote.password file

  6. Then, edit the jmxremote.access file, and append the 'john readwrite' to it.

Once the aforesaid requirement is fulfilled, the eG agent will report a various useful metrics revealing the status, overall performance of the target Apache Solr server as well as the throughput of the clients connected to the target server . These performance statistics are presented in the eG monitoring model using the hierarchical layer model representation.