Re: Where to add custom mbean

2014-02-04 Thread Alan Woodward
Maybe this would be a nice extra hook to add to CoreContainer?  We already have 
three per-container handlers defined in there (CoreAdminHandler, 
CollectionsHandler, InfoAdminHandler) which are instantiated the same way from 
solr.xml.  We could extend this to allow other user-defined handlers which are 
started up and shut down with the container.

Alan Woodward
www.flax.co.uk


On 4 Feb 2014, at 15:48, Chris Hostetter wrote:

> 
> There's really no generic place in solr to say "Here's an MBean, 
> instantiate it on startup so i can monitor it" ... all of the existing 
> monitoring & metrics reporting scaffolding is based arround the idea that 
> if there's a metric you want to monitor that metric *belongs* to something 
> that is useful for some reason (a request handler, a search component, 
> etc...)
> 
> given the info you've provided, i think implementing a RequestHandler is 
> probably your best bet -- unless it's really important to you that it be a 
> singletome for the entire server, not per core: in which case you'd need 
> to configure a custom CoreAdminHandler and do your instantiation there.
> 
> 
> : I've written a custom mbean that aggregates data from all the
> : RequestHandler mbeans in a jvm to provide aggregate statistics for easier
> : monitoring and currently I'm ensuring it gets ran by actually extending
> : RequestHandlerBase and including the class as a request handler in
> : solrconfig.xml. I don't think this is the ideal way of getting this code to
> : run but as a quick hack it got the job done. If I wanted to ensure this
> : class ran / register the mbean at a more appropriate place, earlier on in
> : solr's initialization, where would that be?
> 
> 
> -Hoss
> http://www.lucidworks.com/
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org
> 



Re: Where to add custom mbean

2014-02-04 Thread Chris Hostetter

There's really no generic place in solr to say "Here's an MBean, 
instantiate it on startup so i can monitor it" ... all of the existing 
monitoring & metrics reporting scaffolding is based arround the idea that 
if there's a metric you want to monitor that metric *belongs* to something 
that is useful for some reason (a request handler, a search component, 
etc...)

given the info you've provided, i think implementing a RequestHandler is 
probably your best bet -- unless it's really important to you that it be a 
singletome for the entire server, not per core: in which case you'd need 
to configure a custom CoreAdminHandler and do your instantiation there.


: I've written a custom mbean that aggregates data from all the
: RequestHandler mbeans in a jvm to provide aggregate statistics for easier
: monitoring and currently I'm ensuring it gets ran by actually extending
: RequestHandlerBase and including the class as a request handler in
: solrconfig.xml. I don't think this is the ideal way of getting this code to
: run but as a quick hack it got the job done. If I wanted to ensure this
: class ran / register the mbean at a more appropriate place, earlier on in
: solr's initialization, where would that be?


-Hoss
http://www.lucidworks.com/

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



Re: Where to add custom mbean

2014-02-04 Thread Greg W
That looks like a neat library but still has the same critical flaw I'm
trying to address: "You'll probably want to integrate this into your
application's lifecycle." Where's the best spot in solr's lifecycle to add
a bit of extra monitoring code that just needs to be initialized?

Thanks,
Greg


On Tue, Feb 4, 2014 at 9:07 AM, Otis Gospodnetic  wrote:

> Not sure, but could Coda metrics help you here?
> If it can provide the needed functionality, that seems better than hacking
> Solr RHs, I think.
>
> Otis
> --
> Performance Monitoring * Log Analytics * Search Analytics
> Solr & Elasticsearch Support * http://sematext.com/
>
>
> On Tue, Feb 4, 2014 at 9:59 AM, Greg W  wrote:
>
>> Otis,
>>
>> Unfortunately introducing a new third party app isn't an option for me
>> though I can understand your bias toward SPM. I agree that extending a RHB
>> for monitoring doesn't feel right which is why I was asking for a better
>> place to put it, as part of a suggestion that I submit a patch from
>> solr-user. An unapplied patch on a jira issue is better than no patch at
>> all, right?
>>
>> Thanks,
>> Greg
>>
>>
>> On Mon, Feb 3, 2014 at 10:06 PM, Otis Gospodnetic <
>> otis.gospodne...@gmail.com> wrote:
>>
>>> Hi Greg,
>>>
>>> This sounds overly complex to me.  Extending a RHB to aid you in
>>> monitoring doesn't feel right.  Have you considered using monitoring tools
>>> that can provide you with aggregated views and such?  Have a look at
>>> http://sematext.com/spm , which can do that for you and much more
>>> without you having to hack Solr.
>>>
>>> Otis
>>> --
>>> Performance Monitoring * Log Analytics * Search Analytics
>>> Solr & Elasticsearch Support * http://sematext.com/
>>>
>>>
>>> On Mon, Feb 3, 2014 at 3:19 PM, Greg W  wrote:
>>>
 I've written a custom mbean that aggregates data from all the
 RequestHandler mbeans in a jvm to provide aggregate statistics for easier
 monitoring and currently I'm ensuring it gets ran by actually extending
 RequestHandlerBase and including the class as a request handler in
 solrconfig.xml. I don't think this is the ideal way of getting this code to
 run but as a quick hack it got the job done. If I wanted to ensure this
 class ran / register the mbean at a more appropriate place, earlier on in
 solr's initialization, where would that be?

 Thanks,
 Greg

>>>
>>>
>>
>


Re: Where to add custom mbean

2014-02-04 Thread Otis Gospodnetic
Not sure, but could Coda metrics help you here?
If it can provide the needed functionality, that seems better than hacking
Solr RHs, I think.

Otis
--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/


On Tue, Feb 4, 2014 at 9:59 AM, Greg W  wrote:

> Otis,
>
> Unfortunately introducing a new third party app isn't an option for me
> though I can understand your bias toward SPM. I agree that extending a RHB
> for monitoring doesn't feel right which is why I was asking for a better
> place to put it, as part of a suggestion that I submit a patch from
> solr-user. An unapplied patch on a jira issue is better than no patch at
> all, right?
>
> Thanks,
> Greg
>
>
> On Mon, Feb 3, 2014 at 10:06 PM, Otis Gospodnetic <
> otis.gospodne...@gmail.com> wrote:
>
>> Hi Greg,
>>
>> This sounds overly complex to me.  Extending a RHB to aid you in
>> monitoring doesn't feel right.  Have you considered using monitoring tools
>> that can provide you with aggregated views and such?  Have a look at
>> http://sematext.com/spm , which can do that for you and much more
>> without you having to hack Solr.
>>
>> Otis
>> --
>> Performance Monitoring * Log Analytics * Search Analytics
>> Solr & Elasticsearch Support * http://sematext.com/
>>
>>
>> On Mon, Feb 3, 2014 at 3:19 PM, Greg W  wrote:
>>
>>> I've written a custom mbean that aggregates data from all the
>>> RequestHandler mbeans in a jvm to provide aggregate statistics for easier
>>> monitoring and currently I'm ensuring it gets ran by actually extending
>>> RequestHandlerBase and including the class as a request handler in
>>> solrconfig.xml. I don't think this is the ideal way of getting this code to
>>> run but as a quick hack it got the job done. If I wanted to ensure this
>>> class ran / register the mbean at a more appropriate place, earlier on in
>>> solr's initialization, where would that be?
>>>
>>> Thanks,
>>> Greg
>>>
>>
>>
>


Re: Where to add custom mbean

2014-02-04 Thread Greg W
Otis,

Unfortunately introducing a new third party app isn't an option for me
though I can understand your bias toward SPM. I agree that extending a RHB
for monitoring doesn't feel right which is why I was asking for a better
place to put it, as part of a suggestion that I submit a patch from
solr-user. An unapplied patch on a jira issue is better than no patch at
all, right?

Thanks,
Greg


On Mon, Feb 3, 2014 at 10:06 PM, Otis Gospodnetic <
otis.gospodne...@gmail.com> wrote:

> Hi Greg,
>
> This sounds overly complex to me.  Extending a RHB to aid you in
> monitoring doesn't feel right.  Have you considered using monitoring tools
> that can provide you with aggregated views and such?  Have a look at
> http://sematext.com/spm , which can do that for you and much more without
> you having to hack Solr.
>
> Otis
> --
> Performance Monitoring * Log Analytics * Search Analytics
> Solr & Elasticsearch Support * http://sematext.com/
>
>
> On Mon, Feb 3, 2014 at 3:19 PM, Greg W  wrote:
>
>> I've written a custom mbean that aggregates data from all the
>> RequestHandler mbeans in a jvm to provide aggregate statistics for easier
>> monitoring and currently I'm ensuring it gets ran by actually extending
>> RequestHandlerBase and including the class as a request handler in
>> solrconfig.xml. I don't think this is the ideal way of getting this code to
>> run but as a quick hack it got the job done. If I wanted to ensure this
>> class ran / register the mbean at a more appropriate place, earlier on in
>> solr's initialization, where would that be?
>>
>> Thanks,
>> Greg
>>
>
>


Re: Where to add custom mbean

2014-02-03 Thread Otis Gospodnetic
Hi Greg,

This sounds overly complex to me.  Extending a RHB to aid you in monitoring
doesn't feel right.  Have you considered using monitoring tools that can
provide you with aggregated views and such?  Have a look at
http://sematext.com/spm , which can do that for you and much more without
you having to hack Solr.

Otis
--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/


On Mon, Feb 3, 2014 at 3:19 PM, Greg W  wrote:

> I've written a custom mbean that aggregates data from all the
> RequestHandler mbeans in a jvm to provide aggregate statistics for easier
> monitoring and currently I'm ensuring it gets ran by actually extending
> RequestHandlerBase and including the class as a request handler in
> solrconfig.xml. I don't think this is the ideal way of getting this code to
> run but as a quick hack it got the job done. If I wanted to ensure this
> class ran / register the mbean at a more appropriate place, earlier on in
> solr's initialization, where would that be?
>
> Thanks,
> Greg
>