IBM Cloud Docs
Reusing definitions of logging resources

Reusing definitions of logging resources

To avoid recreating definitions of views, boards, parsing templates, and exclusion rules, you can export these resources from a IBM Log Analysis instance as a JSON file. Then, you can import the definitions into other logging instances.

As of 28 March 2024 the IBM Log Analysis and IBM Cloud Activity Tracker services are deprecated and will no longer be supported as of 30 March 2025. Customers will need to migrate to IBM Cloud Logs, which replaces these two services, prior to 30 March 2025. For information about IBM Cloud Logs, see the IBM Cloud Logs documentation.

Export the configuration of resources in a logging instance

Complete the following steps to export the configuration of your resources:

  1. Launch the IBM Log Analysis web UI.

  2. Click the Settings icon Configuration icon. Then select Organization.

  3. Click Export Config.

  4. In the Export Configuration section, select the types of resources that you want to export.

    Notice that options are disabled if you do not have definitions of this type of resource in your logging instance.

    You can export views and alerts, boards, parsing templates, and exclusion rules.

  5. Select Export and save the file.

Do not edit the exported JSON file. If the JSON file is edited it will be corrupted and cannot be imported into another logging instance.

Import the configuration of resources into a logging instance

Complete the following steps to import the configuration of your resources:

  1. Launch the IBM Log Analysis web UI.

  2. Click the Settings icon Configuration icon. Then select Organization.

  3. Select Import config.

  4. In the Import Configuration section, drop the JSON config file that inclides the resource definitions, or click to upload a file.

  5. Choose Add to existing configuration or Replace existing configuration.

    When you choose the add option, you add assets to the exisiting ones.

    When you choose the replace option, you remove all assets, and new ones are created.

  6. Select Import.

Exporting configuration values using the API

You can export configuration values using the API.

The following configuration settings can be obtained using the API:

GET API configuration methods
Configuration Method
View GET /v1/config/view/{viewId}
Preset alert GET /v1/presetalert/{presetId}
Category GET /v1/config/categories/{type}/{id}

The JSON returned by these methods can be used or modified to create new configurations or update existing configurations.

Creating and updating configurations using exported API values

You can use values obtained by API calls to create new configurations in existing or new logging instances. The JSON can also be used to update existing configurations.

POST (create) API configuration methods
Configuration Method
View POST /v1/config/view
Preset alert POST /v1/presetalert
Category [POST /v1/config/categories/{type}](https://cloud.ibm.com/apidocs/log-analysis#create-category
PUT (update) API configuration methods
Configuration Method
View PUT /v1/config/view/{viewId}
Preset alert PUT /v1/presetalert/{presetId}
Category [PUT /v1/config/categories/{type}/{id}](https://cloud.ibm.com/apidocs/log-analysis#update-category