Alerts: woe is me...

Steven North swn at ocsystems.com
Thu Aug 11 22:59:41 UTC 2011


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



More information about the rhq-devel mailing list