lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SolrJmx" by SimonRosenthal
Date Thu, 21 Jul 2011 13:58:14 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SolrJmx" page has been changed by SimonRosenthal:
http://wiki.apache.org/solr/SolrJmx?action=diff&rev1=15&rev2=16

  = Introduction =
  With version 1.3, Solr can expose runtime statistics as Dynamic MBeans which can be leveraged
to setup monitoring using JMX clients such as jconsole.
  
+ <!> [[Solr3.1]] Since Solr 3.1, these statistics can also be obtained through an HTTP
request to the SolrInfoMbeanHandler. This is configured by default at  http://localhost:8983/solr/admin/mbeans/
.
+ 
  = Configuration =
  JMX configuration is provided in solrconfig.xml
  
- '''Note''' -- Enabling/disabling JMX and securing access to ``MBeanServers is left up to
the user by specifying appropriate JVM parameters and configuration. Please explore the [[http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/|JMX
Technology Home Page]] for more details.
+ '''Note''' -- Enabling/disabling JMX and securing access to MBeanServers is left up to the
user by specifying appropriate JVM parameters and configuration. Please explore the [[http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/|JMX
Technology Home Page]] for more details.
  
  == Existing MBeanServer ==
  {{{
  <jmx />
  }}}
- Enables JMX support in Solr if and only if an existing ``MBeanServer is found. Use this
if you want to configure JMX through JVM parameters. Remove this to disable exposing Solr
configuration and statistics to JMX. If this is specified then Solr will try to list all available
``MBeanServers and use the first one to register MBeans.
+ Enables JMX support in Solr if and only if an existing MBeanServer is found. Use this if
you want to configure JMX through JVM parameters. Remove this to disable exposing Solr configuration
and statistics to JMX. If this is specified then Solr will try to list all available MBeanServers
and use the first one to register MBeans.
  
  == Existing MBeanServer with agentId ==
  {{{
  <jmx agentId="myMBeanServer" />
  }}}
- Enables JMX support in Solr if and only if an existing ``MBeanServer is found matching the
given agentId. If multiple servers are found then the first one is used. If none is found,
an exception is raised and depending on the configuration, Solr may refuse to start.
+ Enables JMX support in Solr if and only if an existing MBeanServer is found matching the
given agentId. If multiple servers are found then the first one is used. If none is found,
an exception is raised and depending on the configuration, Solr may refuse to start.
  
  == New MBeanServer ==
  {{{
  <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solrjmx" />
  }}}
- Creates a new ``MBeanServer exposed for remote monitoring at the specific service url. If
the ``JMXConnectorServer can't be started (probably because the serviceUrl is bad) then an
exception is thrown.
+ Creates a new MBeanServer exposed for remote monitoring at the specific service url. If
the JMXConnectorServer can't be started (probably because the serviceUrl is bad) then an exception
is thrown.
  
  = Quick Demo =
+ Using the example jetty setup provided with Solr installation, we can quickly see what the
JMX support looks like in jconsole.
  
- Using the example jetty setup provided with Solr installation, we can quickly see what the
JMX support looks like in jconsole.
   * Run "ant example" to build the example war file
   * Goto example folder in the Solr installation and run the following command
+ 
  {{{
  java -Dcom.sun.management.jmxremote -jar start.jar
  }}}
@@ -47, +50 @@

  
  = Remote Connection to Solr JMX =
  If you want to connect to Solr remotely, you need to pass in some extra parameters, [[http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#remote|documented
here]]:
+ 
  {{{
  -Dcom.sun.management.jmxremote.port=3000
  -Dcom.sun.management.jmxremote.ssl=false
  -Dcom.sun.management.jmxremote.authenticate=false
  }}}
+ If you are not able to connect from a remote machine, take into account that you may also
need to specify the hostname of the solr host by adding the following property as well:
  
- If you are not able to connect from a remote machine, take into account that you may also
need to specify the hostname of the solr host by adding the following property as well:
  {{{
  -Djava.rmi.server.hostname=IP_OR_HOSTNAME
  }}}
- 
  '''NB:''' making JMX connections into machines running behind NATs (e.g. Amazon's EC2 service)
is not a simple task. The [[http://java.sun.com/j2se/1.4.2/docs/guide/rmi/javarmiproperties.html|java.rmi.server.hostname]]
system property may help, but running JConsole on the server itself and using a remote desktop
is often the simplest solution. See [[http://jmsbrdy.com/monitoring-java-applications-running-on-ec2-i|Monitoring
Java applications running on EC2 instances using JMX]].
  
  <<Anchor(where)>>
+ 
  = Where to find it =
  Support for JMX was built at [[https://issues.apache.org/jira/browse/SOLR-256|SOLR-256 Stats
via JMX]]
  
@@ -69, +73 @@

  = Useful Links =
   * [[http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html|Monitoring and Management
Using JMX]]
   * [[http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html|Monitoring and Managing Tomcat]]
-  * [[http://docs.codehaus.org/display/JETTY/Running+Jetty+with+jconsole|Running Jetty with
jconsole ]]
+  * [[http://docs.codehaus.org/display/JETTY/Running+Jetty+with+jconsole|Running Jetty with
jconsole]]
  

Mime
View raw message