Alerts: woe is me...

Steven North swn at ocsystems.com
Fri Aug 12 05:19:54 UTC 2011


A little more information...

I was looking through the RHQ code and I found the OperationSender 
alert.  It looks like this example did exactly what I was trying to do, 
but apparently the wait code was commented out for some unspecified 
reason.  This doesn't seem too promising...

Steve

On 8/11/2011 3:59 PM, Steven North wrote:
> Hi,
>
> I'm working on a server alert plugin.  For the alert notification I want to:
>
> - execute an operation
> - wait a couple of minutes
> - collect a snapshot
>
> Originally, I was just collecting the snapshot and that worked fine.
>
> At the moment I am having trouble executing the operation.  I am using
> the same kind of code I use in our Java remote client to schedule an
> operation and then wait for its completion, but the operation is
> consistently timing out.  Furthermore, the RHQ server just keeps trying
> to re-execute the notification logic after each time out, but that's not
> my first concern.
>
> In the alert sender send() method I just call
> LookupUtil.getResourceManager().scheduleResourceOperation(...) and then
> call
> LookupUtil.getResourceManager().findResourceOperationHistoriesByCriteria(...)
> as we do in our client.  Checking my agent log file I see the operation
> being performed and apparently completing normally in a few seconds.
> Waiting for completion for 4 minutes does not return any histories at
> all in the alert.  The schedule and the wait are done using overlord as
> the Subject.
>
> Is there any special context I need when scheduling operations from a
> server alert plugin?  Any other ideas?
>
> Thanks in advance,
>
> Steve
>
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel



More information about the rhq-devel mailing list