4 Replies Latest reply on Feb 9, 2009 3:16 PM by mazz

    Removing Plugins

    nsyed4 Newbie

      Pre-tasks Done:
      Environment: Java SE 6 , Fedora 8, Oracle 10g
      Build the RHQ Server and Agent from the repository. Build Number: 2690
      Started the server and the agent as described in the documentation successfully. They are running on different machines.
      Wrote plug-ins for discovering custom MBeans from the JVM platfrom JMX agents successfully. (Discovered Operations, invoked operations...etc)

      As a next step, I have the following questions:

      1. How do I remove the plug-ins?
      I shutdown the RHQ Server, and removed the plug-ins from jbossas/server/default.../rhq-downloads. But the server is again populating that directory with the plug-ins I removed. Where is it getting the plug-ins from?

      2. What are the only plug-ins required for discovering Java resources and invoking JMX Operations?
      I am assuming rhq-platform-plugin-1.2.0-SNAPSHOT.jar, rhq-jmx-plugin-1.2.0-SNAPSHOT.jar, rhq-agent-plugin-1.2.0-SNAPSHOT.jar and some of my own custom plug-ins would be enough. Any other plugins that need to be there due to dependencies?

      Also, I am not sure about the Build number. In which configuration file is it stored?


        • 1. Re: Removing Plugins
          mazz Master

          1. Currently, there is no way to remove or disable plugins. This is something we've wanted to be able to do, but it is complicated to implement correctly (it involves alot of moving parts both on the server AND agent) and we've not had the time or resources to do it yet. See




          for related issues that deal with this. If you want to purge the system of all plugins, you'll need to clean out your database (mvn -Ddbsetup or re-install and in the installer web-app you tell it to "Overwrite existing data"). Obviously, you will lose all data you've collected up until now, but since you are in development mode, that's how its done.

          To specifically answer your question, as of svn rev 2713 in trunk, the plugin contents are backed up in the database (see http://jira.rhq-project.org/browse/RHQ-1090). So even if you delete a plugin from the server's rhq-downloads/rhq-plugins location, the server will be smart enough to know its missing one from its file system and stream it out of the DB back on your file system. This feature allows you to deploy a plugin on one server and have it deployed out to all the other servers in the cloud (i.e. if there are multiple servers in an HA deployment).

          2. You can determine the dependencies of the plugins by looking at their tags in their plugin descriptors (META-INF/rhq-plugin.xml which is in each plugin .jar). If you only care about JMX resources, then the only two plugins you need are the platform plugin and the jmx plugin. You do not need the rhq-agent plugin - it is only needed if you want to manage the agents themselves. If all you care about is managing your own JMX MBeans, then the platform and jmx are the only two you need. BTW: as a side note, the platform plugin is the one (and only) absolutely required plugin for the agent to work. All the others are technically optional. Because you want to manage JMX objects, you will need the jmx plugin in addition to the platform plugin.

          As for the build numbers, there are several ways to know what it is. First, if you look at the help/about box, the RHQ build number is in there. If you look at the server log file, you will see a log message that dumps out the version information, including the build number. It will look something like this:

          23:17:47,484 INFO [CoreServer] Version=[1.2.0-SNAPSHOT], Build Number=[2940], Build Date=[06.Feb.2009 12.48.53 EST]

          Lastly, in the manifest of all the RHQ jar files, the build information can be found ("Build-Number" field). This is true even of the ear itself - see jbossas\server\default\deploy\rhq.ear\META-INF\MANIFEST.MF.

          • 2. Re: Removing Plugins
            nsyed4 Newbie

            Thanks a lot. That was very helpful.

            • 3. Re: Removing Plugins
              nsyed4 Newbie

              I am rebuilding the project again with a clean database.
              What needs to be done to remove the unwanted plug-ins. I assume it needs to be done at building stage. Do I need to remove the unwanted plug-in directories from <rhq.home>/rhq/module/plugins before building the server again.

              • 4. Re: Removing Plugins
                mazz Master

                I don't know if we have a maven profile or flag to say, "build the RHQ Server with only the platform plugin deployed". Might not be a good enhancement JIRA.

                But what you can do is after you fully build everything, just go into your RHQ server's rhq-downloads/rhq-plugins direcotry and delete all of them you do not want.

                Be sure you do this BEFORE you start the server for the very first time.