On Wednesday, June 22, 2011 23:06:59 John Mazzitelli wrote:
I think you have the right idea. But there is no way that I can think
of
to get that URL to show up in the UI as clickable link.
The only thing I can think of is have the URL be output as part of the
server-side plugin operation (called "control"). The URL string would
appear in the results - but I don't think it would be clickable (since I
believe it gets rendered in a TextArea type GWT field). You'd have to
cut-n-paste into the browser. But that would have to be manually
triggered through the server side plugin UI.
In case anyone is interested in server plugin controls (again, for this
use-case Steve mentioned, it might not be applicable because there is no
way that I know of that can trigger this control from an alert - unless
you can do so via a CLI script triggered via alert):
That should be possible, because the CLI Script has access to the local SLSBs.
Using local SLSBs is not encouraged though because, well, their not public
facing and we don't maintain backwards compatibility or anything.
In any case, I think for Steven's usecase, outputting the URL in the Alert
Message area is much simpler than going through the hoops of plugin controls
if for nothing else then for the difficulties you'd have with figuring out
what alert triggered given operation.
Server-side plugin operations are described here (via ControlFacet):
http://rhq-project.org/display/RHQ/Server+Plugin+Development#ServerPluginDe
velopment-ControlFacet
Sorry - not much more than that blurb on this (that entire page is what
we have on server plugin development).
An example of the "control" XML schema for the server plugin descriptors
is seen here:
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=blob;f=etc/samples/custom-
serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml;hb=master
Look for the "serverplugin:control" elements, and its child
"results"
elements.
The server plugin XML Schema is here:
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=blob;f=modules/enterprise/
server/xml-schemas/src/main/resources/rhq-serverplugin.xsd;hb=master
On 06/22/2011 04:39 PM, Steven North wrote:
> Hi,
>
> I am investigating how I might accomplish the following scenario using
> RHQ:
>
> - define an alert on, say, a JBoss metric;
> - when that alert is triggered perform an operation on another resource
> to get a log file
>
> through the SupportFacet; and
>
> - make the URL of that log file available in the RHQ UI as a link (so it
> can be clicked
>
> by the user to download the file and start the proper program to view
>
> it).
>
> It seems like the log file can be acquired using a CLI script
> notification sender. Presumably the script can obtain the id of the
> resource that originates the alert. Deriving the id of the resource to
> be the target of the "get log file" operation will be harder because the
> alert can't provide it.
>
> How about making the URL of log file available in the RHQ UI? I suppose
> the URL could be e-mailed, but is there a way to get the URL displayed
> on the RHQ UI with the alert? Can the URl be in the Alert Notifications
> Message field? Would that show up as an active link in the browser?
> (Guess I can try to get it there and see.)
>
> Thoughts? Pointers to examples of these activities?
>
> Thanks in advance,
>
> Steve
_______________________________________________
rhq-devel mailing list
rhq-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-devel