How to export and import custom registry variables, rules, and configuration from one Foglight Management Server (FMS) to another server?
WORKAROUND
This action can be performed using the jmx-console. Once the registry is exported into one file, then the rules exported into another file, each must be edited very carefully to remove all the other entries other than the targeted custom registry/rules. Then the edited files are transferred to your target FMS %FGLHOME% directory and imported.
Export/Import Procedure:
Caveat:
The rules export file will contain Catalyst rules which are specific to the original FMS. If one is attempting to import ALL the rules from an exported file, these Catalyst entries should be edited/removed from your final version rules file before importing into another FMS. Performing a full export and re-import of configuration can cause problems later on because all the configuration will then be marked as "user edited". This can cause issues when upgrading the server and cartridges because the upgrade may keep the original, "User edited" configuration instead of applying the new configuration. Also, the installed cartridges on the target server MUST match the cartridges installed from the source FMS.
1) Access the jmx-console and login with default Foglight user and password:
http://the_fms:port/jmx-console/
2) Scroll down to "service=ImportExport" and click on it
3) Search this page for "void exportRulesToFile()".
Enter the rules filename (include a file extension such as rules.txt) desired in the "ParamValue" field and select "Invoke".
(this saves the file in %FGLHOME% on the source FMS )
4) Search the same page for "void exportRegistryVariablesToFile()".
Enter the registry filename (include a file extension such as registry.txt) in the "ParamValue" field and select "Invoke".
(file saved in same location as step 3)
Alternatively, it is possible perform an export of all configuration using the -edited flag to ensure that only user-modified configuration are exported:
$FGLHOME/bin/fglcmd.{.sh or .bat} -usr foglight -pwd foglight -cmd util:configexport -edited -f $FGLHOME/name_of_file.xml
5) Edit the file(s) retaining only custom configuration. Save the edited file as a different name so the original export can be retained. Move the edited file(s) to the target FMS %FGLHOME%directory. (See examples below)
6) Import the registry and/or rules file via the "jmx-console ; service=ImportExport ; void importFromFile()".
Enter the registry or rules filename in the "ParamType" field and select "Invoke".
Alternately one can import via fglcmd:
$FGLHOME/bin/fglcmd.{.sh or .bat} -usr foglight -pwd foglight -cmd util:configimport -f $FGLHOME/name_of_file.xml
7) Login to the Administration Console of the Foglight Management Server Navigate to the Administration | Rules & Notifications | Manage Registry Variables
Change the values of the variable CATALYST_URL to point to the proper Foglight Server
Example:
NOTE: Any file for import requires these first two lines indicating the xml version and foglight-config version and also the file ends with the closing tag.
ie.:
Registry variable definitions
Notice each registry entry is preceded by "registry-variable name=..." and each registry variable section is terminated by the closing tag "/registry-variable".
The following example registry file edit was to retain a single registry value "INF_MemoryUseCritical", but the same could be done for other registry values. For example, searching for "VMW" to identify VMWare cartridge registry values and include the required entries in the file.
Rule definitions
Below are examples of rules file edited to retain single custom rules entries.
Simple rules are preceded by "simple-rule id=..." and terminated by "/simple-rule".
Most rules are multiple severity rules; theses are preceded by "severity-family id=..." and each rules variable section is terminated by "/severity-family;".
Note: The same could be done to retain custom rules for specific cartridges; for example, searching for "VMW" to identify VMWare cartridge rules and remove unneeded entries from the file.
STATUS
FREQ-630 was released in 5.7.5 FMS version supplying the Cartridge Builder. See KB 185435
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy