Exporting and importing policies

You can export a selection of your preferred Cloud Pak for AIOps policies, and import that selection into another deployment via the Policies UI. For example, you might do policy set up work on a staging deployment, and then promote your favored working policies to a production deployment of Cloud Pak for AIOps.

Exported policies are written to your browser's download directory. The file is saved in plain JSON format with the file naming convention "YYYY-MM-DD_hh-mm-ss-CP4AIOps-exported-policies.json".

Important: Policies can only be exported and imported on the same product version of Cloud Pak for AIOps.

Procedure

  1. Click the navigation icon at the upper-left corner of the screen to go to the main navigation menu.

  2. In the main navigation menu, click Operate > Automations.

To export policies

  • Select the policies for export from the table by using the checkboxes at the beginning of the table rows. You can select all of the policies by clicking the checkbox in the table header next to Policy name.

  • A banner above the table displays the number of policies that are selected, together with a menu of options. Click More > Export.

  • Click Export. A preformatted JSON file is saved in the following format: "YYYY-MM-DD_hh-mm-ss-CP4AIOps-exported-policies.json".

    Note: Only user policies can be exported. A maximum of 200 policies (no more than 2 MB file size) can be exported at once.

To import policies

  • Click Import policies Import policies.

  • Upload a JSON file and import policies that have been exported from Cloud Pak for AIOps. Select from the following import options:

    IDs

    • Create policies with new IDs
    • Overwrite existing policies and preserve IDs

    States

    • Disable all policies
    • Preserve policy states as defined when exported

  • Click Add file and navigate to your exported policy file. The maximum file size that can be imported is 2 MB. Only JSON files that are exported from Cloud Pak for AIOps are supported.

    Note: Any policy with ID references to connectors, runbooks, business criticality, and users/groups must be edited and saved. This is necessary to reference the new resources on the current system.

    Depending on the import options selected, a summary is displayed with the total number of policies to be imported, new policies to be created, and any existing policies to be overwritten.

  • Click Import.