このコンテンツは選択した言語では利用できません。
6.4. Synchronizing Server Configuration
Even in different environments, JBoss ON servers can share a lot of the same configuration. For example, different JBoss ON servers may manage a development environment, staging environment, and production environment, yet on all three, the servers use similar metric templates and configuration settings.
To simplify managing separate but similar environments, JBoss ON can export the configuration for a server and then import that configuration into another server.
Any user with permissions to manage settings can export the server configuration. There are two categories of data:
- System settings, which include how long alerts, events, and monitoring metrics are stored; the baseline calculation schedule; and the LDAP server configuration.
- Metric collection settings for each resource types.
The information is exported to dumped to a gzipped XML file, which can be easily edited before being imported into another server.
Note
Syncing server configuration is only necessary when servers use different backend databases. Servers which share a database (in the high availability cloud) already share their configuration.
Import and export operations are only done through the JBoss ON CLI. This API is available with the other JBoss ON documentation. Running the CLI is covered more in Running JBoss ON Command-Line Scripts.
6.4.1. Exporting a Server's Configuration
- Log into the JBoss ON CLI.
[root@server bin]# installDir/bin/rhq-cli.sh -u rhqadmin -p rhqadmin
- Export the data to a database object:
rhqadmin@localhost:7080$ var ex = SynchronizationManager.exportAllSubsystems();
- Convert that object into an export file. The file extension should be
.xml.gz
because the export format is a GZIP'ed XML file.rhqadmin@localhost:7080$ saveBytesToFile(ex.exportFile, 'export.xml.gz');
Note
The user must have the manage settings permission to export the server data.