This documentation supports the 20.02 (12.0) version of BMC Discovery.To view an earlier version of the product, select the version from the Product version menu.

Running an export


The BMC Discovery export framework is deprecated

The BMC Discovery export framework is deprecated in the 20.02 (12.0) release of BMC Discovery and will be removed in a future release. For new exports or integrations, you should consider Using-the-REST-API.

BMC Discovery Export enables you to publish data from BMC Discovery directly into relational databases and into all systems that can accept CSV files. BMC Discovery data is exported by creating an exporter, which is a combination of a mapping set with an adapter configuration. These concepts are explained later in this section.

Export does not delete any BMC Discovery data from BMC Discovery, or from the export target.

Exporters

An exporter is the combination of a mapping set and an adapter configuration.

  • The mapping set is a set of mapping files. These allow you to determine which data to extract from BMC Discovery and how to transform it according to the target data model.
  • The adapter configuration is used to determine where to publish the data.

Mapping files and sets

When performing an export, the exporter needs to know which data to read from the BMC Discovery datastore and where to place it. It does this with mapping files. A mapping file is an XML document that contains the following information:

  1. A BMC Discovery datastore query specifying which data to export
  2. Information on how BMC Discovery Export must restructure (or transform) the query result in order to make it usable by the system being exported to (that is, to comply with the remote system's schema)

A mapping set is a set of mapping files that are used to carry out the export. In order to perform an export using a mapping set, the exporter will run the query from each one of the mapping files in the set. A typical export requires more than one query of the datastore. For example, one query to get hosts, another to get Business Application Instances (BAIs), and so on.

For further information about mapping file formats, see The Mapping File Format.

Adapters and adapter configurations

BMC Discovery Export supports the following adapters:

  • RDB — populates relational databases
  • CSV — generates CSV files

An adapter configuration typically contains the information needed to connect to the target destination:

  • Target host
  • Port
  • User name
  • Password

You can create multiple adapter configurations. For example, if you needed to export data from BMC Discovery to two relational databases ("development" and "production") then you would create two adapter configurations for the RDB adapter, one for each destination.

To permit users to edit the adapter configuration

The cmdb-export-administrator user group gives permissions for users to edit the adapter's configuration. To add a user to this group:

  1. From the BMC Discovery appliance UI, log in to BMC Discovery.
  2. From the main menu, click the Administration icon. The Administration page displays. 
  3. From the Security section, click Users.
  4. Edit the profile of any user that you want to administer BMC Discovery Export. Add the user to the cmdb-export-administrator group. The user must be a member of the public group.


This topic provide instructions for running an export.

Warning

Run exports from BMC Discovery only during time periods when no discovery runs are occurring. Doing so ensures that the state of the datastore does not change during the export. Such a change could result in inconsistent data being exported.

You can run an export in the following ways:

  • From the user interface
  • From the command line

To run an export from the UI

  1. From the main menu, click the Administration icon.
    The 
    Administration page opens.
  2. In the Model section, click Export.
  3. Navigate to the Exporters tab.
  4. Click Run for the exporter.
     All other exporters' run links become unavailable when an export is running, so you can run only one export at a time.
     The output for the currently executing exporter is displayed beneath the configuration tabs, refreshing every few seconds to keep the output up to date.
  5. After the export has finished, the output window displays No export is running and stops refreshing.
  6. To re-enable the other exporters' Run links, close the output window.

To run an export from the command line

  1. Log in to the appliance as the Tideway user.
  2. Run the following command (where exporter-name is the name of the exporter you want to run):
    $TIDEWAY/java/integrations/bin/export.sh exporter-name
     The export runs, and the clean log (see Log Files) is written to the console. Future exports can be scheduled by using a cron job.

To view export log files

An export produces the following types of log files:

Export log files

Each export writes logs to the normal BMC Discovery appliance log location. 

  • To view the logs, select Appliance > View Logs.

The following logs are written:

  • Clean log—Contains information about what the exporter did with each item. These log files are called tw_cmdb-export.timestamp.log, where timestamp is the date and time that the export commenced.
  • Full log—Contains much more verbose information about the export process. This log is intended for debugging. The full log is called tw_cmdb-export.log.

When the full log reaches 50 MB, it is rolled; that is, a .1 log number suffix is appended to its filename, and existing logs have their log number suffixes incremented. The oldest log is deleted. Ten logs are retained in addition to the current log.

For more information about viewing BMC Discovery log data, see the Troubleshooting section.

Other log files

Several other log files are also generated in the BMC Discovery Appliance log location directory.

  • Startup log—When BMC Discovery is started, a component of BMC Discovery Export runs to perform some cleanup exercises. The log for this activity is in export-creds.log.
  • Connection test log—Whenever a user tests an adapter configuration connection, the messages for the test are written to a log called tw_exporter_connection_test.log.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*