2 Replies Latest reply on Sep 18, 2012 5:25 AM by roman.valina

    Function of SupportFacet

    roman.valina Newbie

      Can any body help me what for is support facet.
      The only what I found about it is https://docs.jboss.org/author/display/RHQ/Writing+Custom+Plugins#WritingCustomPlugins-SupportFacet. It should be for reading content of log files for example if I understand it right. I am triing to develop some log4j plugin that will listen and dispaly the log4j log files. User will have the option to configure the filters of the logs and see the log records in rhq server. The SupportFacet might be useful.

      Can somebody tel mee how the SupportFacet works? Where can I see the "result" of SupportFacet in rhq server? What needs to be configured in rhq-plugin.xml for using it?
      I know it is experimental, but does the rhq server 4.4.0 support this somehow?


      Thank you Roman

        • 1. Re: Function of SupportFacet
          Lukas Krejci Apprentice

          The primary usecase for SupportFacet is to gather some diagnostics info that should be sent over to "someone" that would make use of it - logs, thread-dumps, temp dirs, whatever applies to your managed resource. As you correctly said, it is an experimental feature. Unfortunately there is no GUI for it, you can only access it programatically through the "SupportManager" in the CLI. The SupportManager has a single method - "getSnapshotReport" that, upon invocation, will contact the agent, call the SupportFacet method on the appropriate resource component, and put the resulting file in the downloads section of the RHQ server, for which it will return the URL for you.


          On the other hand if you are looking for merely showing log entries from some log files, you may want to try the Event subsystem. I could find very little docs on it, unfortunately, but you can take a look at for example at the JBoss AS 4 plugin ($RHQ_SOURCE/modules/plugins/jboss-as) that uses them.


          Using the Event subsystem basically involves defining some "event" tags in your plugin descriptor and then configuring the EventContext (ResourceContext.getEventContext() ) during the start method of your resource component.


          Please be aware though that the event subsystem can generate a substantial load on the database and so you should use it with care.

          • 2. Re: Function of SupportFacet
            roman.valina Newbie

            Thank you for your fast replay. Yes the events looks much more better for my purpose, I will explore them. I developed only the very simple HornetQ plugin few months ago so I am not familiar with all RHQ features.


            Díky Lukáši