Editing the configuration item XML file
<Configuration item>.xml files are used to configure the mapping attributes for transferring TADDM discovery data to ServiceNow CMDB and to establish relationships between TADDM and ServiceNow CIs. Typically, these XML files have the same name as the configuration items that they map.
These XML files are preconfigured. You can customize the elements and associated attributes based on your requirements.
-
The following is an example of sample code:
<ciMapping> <configurationItem name="AppServer" targetTable="cmdb_ci_appl"> <!-- AppServer relation with Computer System --> <relationship value="true"> <outbound value="true"> <relation name="outbound_relations"> <srcRelationType name="RunsOn" /> <srcAttributeType name="ComputerSystem" /> <targetAttribute name="target" value="Host.Guid" /> <targetRelationType name="type" value="Runs on" /> <targetClass name="sys_class_name" value="cmdb_ci_hardware" /> </relation> </outbound> </relationship> <srcAttribute name="ConfigFile.URI" type="String"> <targetAttribute>config_directory</targetAttribute> <defaultValue></defaultValue> <magicMethod></magicMethod> </srcAttribute> </configurationItem> <!-- Sql Server --> <configurationItem name="SqlServer" targetTable="cmdb_ci_db_mssql_server"> <srcAttribute name="Name" type="String"> <targetAttribute>instance</targetAttribute> <defaultValue></defaultValue> <magicMethod></magicMethod> </srcAttribute> </configurationItem> </ciMapping>
-
<ciMapping> <configurationItem name="PacemakerNode" targetTable="cmdb_ci_unix_cluster_node"> <!-- ComputerSystemCluster relationship --> <relationship value="true"> <outbound value="true"> <relation name="outbound_relations" type="suggested"> <srcRelationType name="contains" /> <srcAttributeType name="PacemakerCluster" /> <targetAttribute name="target" value="Parent.Guid" /> <targetRelationType name="type" value="Cluster of" /> <targetClass name="sys_class_name" value="cmdb_ci_unix_cluster" /> </relation> <relation name="outbound_relations" type="suggested"> <srcRelationType name="realizes" /> <srcAttributeType name="ComputerSystem" /> <targetAttribute name="target" value="System.Guid" /> <targetRelationType name="type" value="Hosted on" /> <targetClass name="sys_class_name" value="cmdb_ci_server" /> </relation> </outbound> </relationship> <srcAttribute name="Name" type="String"> <targetAttribute>name</targetAttribute> <defaultValue></defaultValue> <magicMethod></magicMethod> </srcAttribute> </configurationItem> </ciMapping>