[jira] Created: (SOLR-256) Stats via JMX

classic Classic list List threaded Threaded
46 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
Stats via JMX
-------------

                 Key: SOLR-256
                 URL: https://issues.apache.org/jira/browse/SOLR-256
             Project: Solr
          Issue Type: New Feature
            Reporter: Sharad Agarwal
            Priority: Minor


This patch add JMX capability to get statistics from all the SolrInfoMBean.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sharad Agarwal updated SOLR-256:
--------------------------------

    Attachment: jmx.patch

It uses Dynamic MBean to expose all SolrInfoMBean getStatistics() NameList keys as String getters.


> Stats via JMX
> -------------
>
>                 Key: SOLR-256
>                 URL: https://issues.apache.org/jira/browse/SOLR-256
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Sharad Agarwal
>            Priority: Minor
>         Attachments: jmx.patch
>
>
> This patch add JMX capability to get statistics from all the SolrInfoMBean.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sharad Agarwal updated SOLR-256:
--------------------------------

    Component/s: update
                 search
    Description:
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)

  was:This patch add JMX capability to get statistics from all the SolrInfoMBean.


> 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
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sharad Agarwal updated SOLR-256:
--------------------------------

    Attachment: jmx.patch

-Corrected line wrap to 80 columns
-Used the original LinkedHashMap (when jmx monitoring in not enabled)

> 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
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-256:
--------------------------

    Attachment: jmx.patch

update of previous patch that works against trunk (r550170)

> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507660 ]

Hoss Man commented on SOLR-256:
-------------------------------

Sharad: JMX is one of those things i don't really understand very well, but i tried out the patch and played around with jconsole and it's really cool.

one thing i'm not clear on (forgive my jmx ignorance) when trying to figure out how jconsole worked, i found some info saying that to enable JMX in a java app, you use "-Dcom.sun.management.jmxremote" option on the java command line ... doing that even without this patch allowed jconsole to "autodetect" that the "start.jar" process on my local machine supported JMX and gave me some interesting stats on things like memory and thread usage info from the jetty instance (including MBeans for the java.util.Logger's SOlr creates).

With the patch, it doesn't seem to matter wether i use that commandline option or not i can only get access to the new solr specific stats if i tell jconsole to explicitly connect to the service:jmx:... url that shows up in the log.  but in this case it can't get access to the other interesting stats from before (memory, thread, etc...) ... it seems like i can make two seperates "sessions" (forgive me if my terminology is wrong) to get this info, but not in the same session

Is there a way to "register" the SOlr MBeans with the JVMs main JMX instance so all of hte info is available together?

also: if we're going to have options for specifying the port for remove JMX connections, shoudl we also have options for the user/pass to connect with?



> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

    [ 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507998 ]

Hoss Man commented on SOLR-256:
-------------------------------

> 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();

that seems like the way to go.

 the one thing i'm not clear on is if there is simple  programmaticly way to tell when JMX monitoring is already enabled so we can still do the check you have in the static block and only use the JMXified impls if we need them (i'm assuming you put that in because there is some overhead we want to avoid if JMX is not needed)

the javadocs for ManagementFactory.getPlatformMBeanServer() indicate that it creates on first use ... so testing that won't work ... we could test for the system properties ourselves, but i *think* servlet containers like jetty and tomcat have their own config file syntax for enabling JMX and then call the neccessary underlying methods , so just becuase those properties aren't set doesn't neccessarily mean anything right?

do you know if my guess about servlet containers programmaticly turning JMX on even without the standard system properties being set is true? do you have any suggestions on how to deal with this?  

> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508053 ]

Sharad Agarwal commented on SOLR-256:
-------------------------------------

ArrayList list = MBeanServerFactory.findMBeanServer(null);
gives all registered mbeanserver. It could be used to figure out programitically whether jmx is enabled or not.




> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sharad Agarwal updated SOLR-256:
--------------------------------

    Attachment: jmx.patch

Update of patch to work on standard JAVA_OPTS to enable JMX.

Now standard JMX properties (refer http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#properties) are used to configure JMX.

To test the patch
set -Dcom.sun.management.jmxremote in JAVA_OPTS environment variable
then try using jconsole.



> 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, 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-256:
--------------------------

    Attachment: jmx.patch

Sharad: my concern with your most recent patch is that if a servlet container uses it's own config to drive programmatic JMX Server creation (jetty plus appears to do this past on the example jetty-jmx.xml config file, but i haven't actually confirmed this), then Solr won't detect it  because it's looking explicitly for the system properties.

based on the javadocs your findMBeanServer(null) idea seems right on the money ... i'm attaching a tweak to your patch that uses this appraoch, and it seems to work great, what do you think?

(was there a reason you decided to look for the properties explicitly instead of try this appraoch?)

Any JMX experts want to chime in whether we should be doing something differently?

> 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, 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514588 ]

Sharad Agarwal commented on SOLR-256:
-------------------------------------

I earlier tried with findMBeanServer(null) with tomcat; and it always return me non-empty list of mbeanservers irrespective of JMX enabled or not. In tomcat it gets enabled via system properties.
So to me it seems that having mbean server instance may not really confirm that JMX is enabled or not.

Saying that, i think it may be OK to have the MonitoredMap even when JMX is not enabled. (dont think any overhead in using MonitoredMap); whenever JMX is enabled by either of the ways (standard system properties or via jetty config), both would work fine.



> 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, 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514884 ]

Hoss Man commented on SOLR-256:
-------------------------------

Hmmm... some quick poking around makes it seem that tomcat always uses MBeanServers to manage things -- regardless of whether you explicitly turn on JMX monitoring or not (there seems to be an assumption that of course you want to monitor you server -- i can't really argue with that)

i don't really know enough about JMX to know if there really is any sort of overhead here -- i suppose it wouldn't hurt to only use the MOnitoredMap if an explicit option is set (but we shouldn't startup our own MBeanServer like hte orriginal patch -- just use the main one)  but i'm also fine committing the patch as is.

any tomcat/jmx experts want to chime in here?

> 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, 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528595 ]

Sami Dalouche commented on SOLR-256:
------------------------------------

Hoss: It would probably be interesting to look at how Spring Framework solved the problem.

http://static.springframework.org/spring/docs/2.0.x/reference/jmx.html

Spring JMX allows to export beans using JMX, and has an autodetection of the MBeanServer..  ("locateExistingServerIfPossible"). So, their code should probably either be linked, or reused to achieve similar effect...

Regards,
Sami Dalouche

> 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, 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528615 ]

Hoss Man commented on SOLR-256:
-------------------------------

Sami: thanks for the pointer to the spring docs ... both because it's informative and because it made me realize this issue is still open, i thought i'd committed this a long time ago ... doh!

Spring's approach to figuring out if there is an MBeanServer is basically the same as what we've been looking at doing: call MBeanServerFactory.findMBeanServer and see what we get ... they just put some more bells and whistles on it to warn you if more then one is found and you haven't configured the agentId of the one you want (which is a good idea)

the general approach spring takes to JMX as a whole however is subtly different then what we've been talking about:  so far we've discussed:

 * having Solr specific configs for creating a Solr specific MBeanServer and if those are set, then wrap all of our info registry stuff so they are MBean aware.
...OR...
 * having no Solr specific config options and wrapping the info registry stuff in MBeans if we detect an MBeanServer already running.

Spring's appraoch:
 * have spring specific configs that specify things should be wraped in MBeans
 * have spring specific configs that specify if a spring specific MBeanServer should be created, and if not which existing MBeanServer to try and use by agentId.
 * if the first config option is set, but not the second, then register those MBeans with whatever MBeanServer you can find.

...this seems like the right way to go.  people that don't want any JMX at all won't get it.  people who want JMX if-and-only-if they've activate an MBeanServer via the servlet container can configure the MBean wrapping option.  people that want Solr to do it all can configure solr with that info as well.

basically it's a merge of both styles of patches so far.

Unfortunately most of the existing patches are now unusable because of the Multi-core refactoring ... but i will try to work on a new patch (not sure when though, so if anyone else is gung ho don't let me stop you)



> 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, 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528851 ]

Hoss Man commented on SOLR-256:
-------------------------------

proposed solrconfig.xml syntax...

<jmx />

...wraps the solr registry stuff in MBeans, adds them to the first MBeanSearver it finds (if any) but will not create one.

<jmx agentId="foo" />

...wraps the solr registry stuff in MBeans, adds them to the first MBeanServer it finds matching that agentId, error if MBeanServer can't be found.

<jmx serviceurl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr" />

...wraps the solr registry stuff in MBeans, foracbly spins up 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 error.

(we can punt on the issue of security -- if users want Solr to manage their JMX remote debuging then it's wide open; if you want password files or ssl, then configure that with the JVM system properties for remote debugging and just tell solr "<jmx />")



> 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, 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-256:
---------------------------------------

    Attachment: SOLR-256.patch

A new patch which incorporates Hoss's proposed syntax. All three syntax such as jmx, jmx with agentId and jmx with serviceUrl are supported.

SolrConfig is modified to load JMX configuration. A new class called JmxManager is introduced which intializes JMX support and registers all SolrInfoMBeans (using core.getInfoRegistry). JmxManager is created per core in the SolrCore constructor. It is destroyed in the SolrCore.close() method.

> 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, jmx.patch, jmx.patch, SOLR-256.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-256:
---------------------------------------

    Attachment: SOLR-256.patch

Fixed SOLR-256.patch to avoid NullPointerException during core shutdown when JMX is not enabled.

> 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, jmx.patch, jmx.patch, SOLR-256.patch, SOLR-256.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-256:
---------------------------------------

    Attachment: SOLR-256.patch

Changes
 * Changed the type of the SolrInfoMBeans to the key specified in registry. Previously, I had used the SolrInfoMBean class's simple name which lead to duplicate registration of LRUCache (which is used as filterCache, queryResultCache and documentCache).
 * Fixed the parent name of the MBeans to solr (if using single cores). With multicores, the parent name is solr/core-name
 * Throws an exception if no server is found with the given agentId
 * Removed code I had added for debugging

> 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, jmx.patch, jmx.patch, SOLR-256.patch, SOLR-256.patch, SOLR-256.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (SOLR-256) Stats via JMX

Soren Daugaard (Jira)
In reply to this post by Soren Daugaard (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589836#action_12589836 ]

shalinmangar edited comment on SOLR-256 at 4/16/08 11:23 PM:
----------------------------------------------------------------------

Changes
 * Changed the type of the SolrInfoMBeans to the key specified in registry. Previously, I had used the SolrInfoMBean class's simple name which lead to duplicate registration of LRUCache (which is used as filterCache, queryResultCache and documentCache).
 * Fixed the parent name of the MBeans to solr (if using single cores). With multicores, the parent name is solr/core-name
 * Throws an exception if no server is found with the given agentId
 * Removed code I had added for debugging

Also, I've added <jmx /> in the example solrconfig.xml to turn on JMX by default.

      was (Author: shalinmangar):
    Changes
 * Changed the type of the SolrInfoMBeans to the key specified in registry. Previously, I had used the SolrInfoMBean class's simple name which lead to duplicate registration of LRUCache (which is used as filterCache, queryResultCache and documentCache).
 * Fixed the parent name of the MBeans to solr (if using single cores). With multicores, the parent name is solr/core-name
 * Throws an exception if no server is found with the given agentId
 * Removed code I had added for debugging
 

> 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, jmx.patch, jmx.patch, SOLR-256.patch, SOLR-256.patch, SOLR-256.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.

123