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

The extended RDB mapping set


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.


The Extended RDB mapping set provides a set of mapping files for exporting the main BMC Discovery inferred nodes, except for Host Based Adapters (HBAs).

Note

In version 10.2, the host.xml mapping file was modified: the interface_name, interface_speed, interface_duplex, and interface_negotiation are no longer exported with the Network Interface CI information by default.

If you need to export the mentioned details, customize the Extended RDB adapter mapping set by uploading the host.xml file (for more information on customizing a mapping set, see Managing-mapping-sets).

When importing data to the external database, you need to modify the default database scripts used for initial configuration on the RDB side to match the introduced changes in the export schema. You can download a sample customized scripts for OracleMySQL, and for SQLServer: SQLServer.sql and SQLServer.osql.

Recommendation

This mapping set was developed to serve as the basis of a best practice, used to export BMC Discovery data to RDBMS. It is not intended to be the only best practice, nor does it cover all use cases.

Mapping files

The extended RDB Mapping set is designed in such a way that it can be used to form a modular export. That is, the user can pick and match any of the mapping files in the mapping set to decide what they want to export. Each mapping file contains a main node and relevant relationships to other nodes. The exception to this (no relationships) is the Host mapping, as this is expected to form the basis of any export set.

As an example, the BAI mapping file exports to a BAI table, as well as to a BAI-to-Host relationships table. If you include only the Host and BAI mapping files then they will export all data related to both nodes and the relationship links. If you want to include SI in your exports, then this will export the SIs and relationships to BAIs and Hosts.

The idea behind this is to allow flexibility in the export schema while maintaining consistency. If a new node is to be added to the export, then the same process should be applied.

All mapping files will only export data that has been modified since the last export date. This functionality can be overridden by de-selecting the Export Changed Items flag when defining the Exporter.

The Extended RDB mapping set is made of the mapping files as described below.

Mapping File

Relationship

Fields

Output Table

bai.xml

BAIs, relationship to Hosts, Cyclic dependencies to: Contained BAIs, DependedOn BAIs

BAI: bai_key, name, description, type, version
Host: key
Cyclic Dependency BAIs: related BAIKey

bai_ci, bai_contained_bai_rel, bai_dependedon_bai_rel, bai_host_rel

host.xml

Hosts, Network Interfaces and related Subnet

Host: host_key, host_hostname, host_name, description, domain, model, serial, ram, max_ram, workgroup, vendor, os, os_edition, os_version, os_eos, os_eoes, num_processors, num_logical_processors, processor_type, processor_speed, cores_per_processor, power_watts, btu_h, u_size, hw_eos, hw_eoes, host_created_date, host_modified_date, last_update_success
 Network Interface: interface_key, interface_netmask, interface_ipaddress, interface_subnet.

host_ci, host_networkinterface_ci

switch.xml

Switches, Switch Ports, relationships to Network Interface and Hosts

Switch: switch_key, switch_name, description, status, model, ostype, osversion
 Switch Port: switch_port, interface_key, connected_ip_addr, connected_mac_addr, port_speed, port_duplex, port_negotiation, port_description, port_state, port_domain, port_vlan, port_vland_id
Host: key

switch_ci, switch_host_rel, switch_interface_ci

si.xml

Software Instances: relationships to Hosts and BAIs; Cyclic dependencies to: peer-to-peer communicating SIs, client-server communicating SIs, Contained SIs, DependedOn SIs

Software Instance: si_key, si_name, si_type, si_version, product_version, prod_release, edition, service_pack, build, patch, revision, si_eos, si_eoes
 BAI: bai_key
 Host: host_key
 Cyclic Dependency SIs: related SI key

si_ci, si_host_rel, si_client_server_comms_rel, si_contained_si_rel, si_dependedon_si_rel, si_peer_to_peer_comms_rel, si_bai_rel

package.xml

Packages and Hosts with those packages installed

Package: package_key, package_name, package_version, package_revision, package_os, package_created_date, package_modified_date
Host: host_key

package_ci, package_host_rel

patch.xml

Patches and Hosts with those patches installed

Patch: patch_key, patch_name, patch_os, patch_created_date, patch_modified_date
 Host: host_key

patch_ci, patch_host_rel

file.xml

Files and relationships to SIs and Hosts

File: file_key, file_path, file_size, file_md5sum, file_last_modified, file_created_date
 Host: host_key
SI: si_key

file_ci, file_host_rel, file_si_rel

cluster.xml

Clusters and relationships to member Hosts

Cluster: cluster_key, cluster_name, cluster_type, cluster_created, cluster_modified
Host: host_key

cluster_ci, cluster_host_rel

virtualcontainer.xml

Virtual Hosts and related Physical Hosts

SI running virtualisation software: v_instance_key, v_instance_name, v_product_name, v_product_version, v_product_last_update_success, v_product_created, v_product_modified
 Running Host: v_host_key

virtualcontainer_ci, virtualcontainer_vhost_rel

hostcontainer.xml

Export Host Containers and their Host relationships

Host container: host_container_key, host_container_name, host_container_type, host_container_created, host_container_modified
 Running Host: contained_host_key

hostcontainer_ci, hostcontainer_host_rel

Extended RDB mapping schema

The following diagram provides a description of the target schema.

extended_mapping_set.png

Configuration on the RDB side

To create this schema, the Extended RDB mapping set is provided with the following database specific scripts in the $TIDEWAY/java/integrations/mappings/extended-rdb directory:

  • mySQL.sql
  • Oracle.sql
  • SQLServer.osql
  • SQLServer.sql

There are also generic SQL statements in each of the mapping (xml) files for reference.

MySQL

In the MySQL command line client:
use <databasename>
source <file>

Oracle

In a command window:
sqlplus <user>/<password>@<SID> -d <databasename>
@<filename>

SQL Server

In a command window:
osql -S <hostname>[,<port>] -U <user> -P <password> -i <file>

 

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