[
https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507777
]
Sharad Agarwal commented on SOLR-256:
-------------------------------------
Hoss, thanks for having given a look at the patch.
Via -Dcom.sun.management.jmxremote jvm "local" platform monitoring gets
enabled; and you get to see all jvm statistics.
This patch actually starts its own mbean registry (called MBeanServer).
mbeanServer = MBeanServerFactory.createMBeanServer();
java.lang.String serviceUrl = "service:jmx:rmi:///jndi/rmi://"
+ InetAddress.getLocalHost().getHostAddress().toString() + ":"
+ jmxPort + "/solr";
JMXConnectorServer cs = JMXConnectorServerFactory
.newJMXConnectorServer(new JMXServiceURL(serviceUrl), null,
mbeanServer);
cs.start();
Instead of starting its own, other alternative (as you have pointed out) could
be to use platform registry itself. In that case:
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
Register all solr mbean into platform mbeanserver itself. In this case all info
would be available together.
Remote monitoring and access control could be set up using appropriate
com.sun.management.jmxremote.port, com.sun.management.jmxremote.password.file,
com.sun.management.jmxremote.ssl options. I found
http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#properties
pretty handy.
I agree with you that having solr stats along with jvm stats makes more sense
as it will require just one registry to manage.(setting up ports and access
control). I can work on the patch to have that in place.
> Stats via JMX
> -------------
>
> Key: SOLR-256
> URL: https://issues.apache.org/jira/browse/SOLR-256
> Project: Solr
> Issue Type: New Feature
> Components: search, update
> Reporter: Sharad Agarwal
> Priority: Minor
> Attachments: jmx.patch, jmx.patch, jmx.patch
>
>
> This patch adds JMX capability to get statistics from all the SolrInfoMBean.
> The implementation is done such a way to minimize code changes.
> In SolrInfoRegistry, I have overloaded Map's put and remove methods to
> register and unregister SolrInfoMBean in MBeanServer.
> Later on, I am planning to use register and unregister methods in
> SolrInfoRegistry and removing getRegistry() method (Hiding the map instance
> to other classes)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.