Configuration
Some resources can be configured through RHQ. This page will describe how to do it.
Concepts
Supported resources
Some, but not all, resources are configurable via RHQ. Whether a resource is configurable or not, and what aspects of a resource are configurable, are determined by the plugin's Plugin Descriptor.
Resources (or, more appropriately said, resource types) that support configuration will either show a "Configure" tab when the resource is selected or a little 'C' icon on the Browse Resources page in the UI.
How Does Configuration Work?
As already stated, this very much depends on the individual resource type and how the plugin writer implemented it for the specific resource.
In general the steps are always the same:
- RHQ presents the user with the current configuration
- The user changes the configuration and submits it
- RHQ sends the configuration update asynchronously to the agent managing the specific resource
- The agent applies the configuration changes and reports success or failure along with the now current configuration back to the server
- The server lists the new configuration revision on the history page
Property types
Configurable properties come in different types, that are configured in the plugin descriptor for each resource type. Those are e.g.
RHQ will check the entered data when submitting the configuration update form.
Unset properties
For some properties you will see a "Unset" mark as in the following example:

The semantics of a property being unset is that RHQ will not submit any value to the managed resource, but relies on the value from the managed resource. This is useful for properties on the configure tab or also when manually taking a resource into inventory where you don't want or don't need to specify any data. An example for this would be credentials for an unsecured JBoss AS resource.
Revisions / History
RHQ saves configurations in a history table. This allows you to look at past versions. It also allows you to see who has changed a configuration for auditing purposes.
Revision IDs
Revisions are keyed by a numeric id. The id numbers are shared between all configurable resources. This means that if you e.g. have two resources A and B and you first configure A and then B and then A again, A will most likely have revision numbers 1,2 and 5,6 while B will have numbers 3 and 4 for its configuration revisions.
Revision ids will also advance by a bigger number when the RHQ server is restarted. So if e.g. the last revision id was 7 before the restart, it could be 50 after the restart.
Access rights
In order to configure a resource, the correct access rights need to be present if required. The exact rights needed depend on the resource type. For the PostgreSQL database as an example you need to have both of:
- correct database superuser credentials
- the RHQ Agent needs to be able to read and write the PostgreSQL configuration files.
The Configure tab
The configure tab shows by default the current configuration. At the top of it is a little "History" button to switch to the history view.
Current (Edit) view
The current view shows the properties grouped together. What properties are grouped together are defined in the plugin descriptor. Each group contains a name (e.g. General or Plugin Container) shown in the group header. Clicking on the group header will collapse or expand it.

Some groups with seldom used properties are collapsed by default.
Clicking "Edit" at the top will allow you to change properties and present you with a "save" button at the bottom of the page.
When "save" is invoked you will be forwarded to the history view where you see a message that your configuration request has been forwarded to the agent for processing.

History view
The history view is split into two parts:
- on the top you will find some basic information about the current configuration

- below is a list of recorded configurations.

For each revision you see when it was submitted, when the change was completed, if it succeeded or failed and who triggered the change. If the RHQ system provided the revision (e.g. when initially reading the configuration from the managed resource) the user field will be empty.
In case of a failure, you may click on the failure status and get some more information on why the request failed.
Clicking on a revision id will add a panel below that shows the properties of the selected revision. This panel looks like the current view above.
The revision id with the asterisk (*) next to it is the current configuration.