6 Replies Latest reply on May 5, 2010 11:37 AM by pilhuhn

    JBoss ON - Custom "Operation"

    kejoseph

      JBoss Operations Network has a few built in operations - like "Start", "Shutdown", "Restart". Is it possible to create a custom one - like one that takes a thread dump ?

       

      PS : I have JON 2.3

       

      Thanks,

      Kevin

        • 1. Re: JBoss ON - Custom "Operation"
          pilhuhn

          Kevin,

           

          in theory yes - meaning that you would need the plugin sources and write this operation.

           

          But in this case, you may have luck - the dump threads operation may already present on the JVM

          resource (or its children) given that you are running Java 6 for the respective AS you are managing.

           

            Heiko

          • 2. Re: JBoss ON - Custom "Operation"
            lkrejci

            I'm not sure what resource you want your new operation for, but if it is for a JBoss AS server you have an option. If your operation is "scriptable" (i.e. using a bash script or such like), you can put such script in the bin directory of the JBoss AS and let JON discover that script. You can then execute that script (from JON UI, using the execute operation on that script). I.e. you're not creating a new custom operation per se, but using this approach you'd be able to generate the thread dump for example.

            • 3. Re: JBoss ON - Custom "Operation"
              kejoseph

              Thanks for the response both of you. My requirement is to trigger a thread dump when an event occurs - like reaching MaxThreads etc.

               

              In the existing setup, using Alerts, I can send an e-mail to notify myself about the error. But I would like to have the ability of invoking an "Operation" when the alert is tiggered.

               

              Is there a document I can look at to achieve this ?

              • 4. Re: JBoss ON - Custom "Operation"
                pilhuhn

                Kevin,

                that(*) is not supported in 2.3.x, but will very probably be supported in 2.4, as we introduced this feature in the upstream project to JBossON just recently.

                 

                Heiko

                 

                *) 'that' meaning that in 2.3 alerts can only trigger operations on the resource that is alerted.

                • 5. Re: JBoss ON - Custom "Operation"
                  kejoseph

                  Thanks for the quick response Heiko. Is that documented someplace ?

                   

                  Appreciate your help !

                  • 6. Re: JBoss ON - Custom "Operation"
                    pilhuhn

                    Well, on the release notes for RHQ community build 3.0.0.B05.

                    See RHQ community build 3.0.0.B05 released and especially http://rhq-project.org/display/RHQ/Release+Notes+3.0.0.B05

                    (interestingly the respective BZ is not included in the release notes).

                     

                    I was planning on creating a new episode of the Jopr podcast, that will show examples of this.