Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After you have built your template and you know that it works, you should add a number of identifications into to the template.

Origin and Trust Level

...

You should not include the version number of the inventory tool in the Origin UNLESS the data source has changed significantly from one version of the tool to the next (i.e. Zenworks for Desktop 7.x and the current version of Zenworks Asset Management 10 use two different database schemas and modules so the inventory data will be different). Since the first template was written for 10 and was called “Zenworks”, you will need to call the origin “Zenworks 7” if you build a template for the older version. Please make the values simple. Only use Use only major versions IF on, if a version is needed at all. In most cases a version is not needed  (i.e. The database schema for Unicenter DSM r11 and ITCM r12 did not changed, so no version is needed), as an example have is the Origin value for the DSM/ITCM template called “ITCM – AC”, to show that it came through the Asset Converter.

Do not change the Origin if you make small tweaks to the Template, if . If you need to tell the templates apart, just add it in the Additional Inventory Comment described bellow (see Asset Converter Inventory Section).

If you are creating a template that you think can be shared, please share your Origin value with Service Management Swat so we can get it registered and posted (this document will be updated with the location of the registered Original values). This will help to ensure that Original values remain unique and consistent and to make the ServiceAide ITCM/SCM Content Team aware of new sources.

The trust level can be from 1-5 please . Please select a an appropriate level. 4 should be used for 3rd party inventory tools. 5 should only be used for ITCM Agent data.

...

We recommend that you add a “Comments” section at the top of the template between the <xml> and <asset-converter> tags, the . The comment section is not used by the actual Asset Converter, but it is a good way to inform users about what the template does and specific things to watch out for.

...

In this section you can include any relevant information to that describes the template. We recommend a description text, version, and author. As you can see in the example above, you can include information such as version history and information on test environment. The information in the Comments section is not imported into the database. If you need to be able to report on specific information, you should include it in an Additional inventory section as described below (see Asset Converter Inventory Section).

...

To distinguish between data sources when they are deployed, it is recommended that you include an Additional Inventory section.

In this section you should put Version, Filename, and a Comment as follows:

Code Block
    <group name="AdditionalInventory">
      <group name="Asset Coverter">
        <attribute name="Name" value="SCCM_AISW.xml" type="string"/>
        <attribute name="Version" value="0.9.0" type="string"/>
        <attribute name="Comment" value="Delta scan last 24 hours" type="string"/>
      </group>
    </group>

...

NOTE: This section is not for general comments like “This is a SCCM Template”. You should only put comment that can be used to distinguish between two templates with the same name and data, ; for example, a delta template (see Delta Scans) . To summarize, Origin, Filename, and Version, describe the data. Comments should describe any extra filtering or similar information valuable for understanding the date.

...

We at Service Management Swat would like to get involved in any template that you have been or will be working on, to share and help on the process , and also guide you in the right direction if a Template already exists for that Vendor on the files. We will update the WEB page with new template and notify the Software Compliance internal Mail group when the changes are done.

...

Delta Scans

In large environments, you might want only to update information from assets that indicate it has been updated. The current version of the Asset Converter does not support delta scanning. But, if the data source contains a “Last run date”, you could use a simple SQL command to limit the scan to only e.g. last 24 hours.

...

  • Know Your Data Source: It is extremely important that you know the data you are to import, not only from a database level but also from the third party tool’s GUI. If you do not have the skill, you must ally yourself with a subject matter expert who can show you the basics of the tool and also go through and/or identify the fields that you need to import. Once you understand the data from the tool, you must obtain the database schema to find the link between the inventory tool’s GUI and it’s database schema.
  • Ensure a good test system. In order to develop a reliable template, you need a reliable test/develop system. The system should have at least 3 computers inventoried of different types. Having thousands inventoried machines in the test system is not a problem, but it is not needed for developing the template. You can always test performance on the production system once the template is developed.

    If the database has many asset assets, you can limit the number to import when you develop the template. You limit the numbers by adding a <Processing-info> Section between the <datasource> and the <output-settings> sections, like this which can only will import 10 assets:
Code Block
………
</datasource>
<processing-info>
	<max-assets-to-process value="10"/>
</processing-info>
<output-settings>
……….

...

If you do not have a SQL tool you can use a tool that comes with Microsoft Office called MS-Query, it allow allows you to connect to a number of databases and via ODBC. Ms-Query is nod added with a shortcut by default, but it is installed in the default Office folder and called ‘MSQRY32.EXE’ e.g: C:\Program Files\Microsoft Office\Office12\MSQRY32.EXE.

b. Template editor: The template is a XML file that in essence is a formatted text file. You can use any text editor you like, including Notepad. One thing we would recommend is that, if you have a development tool like Microsoft Visual Studio, you can use the XML editor in that tool, which has coloring codes and other features that make it easier developing XML documents like the Asset Collector template

  • Ensure you have SQL skills. If you use a database as the database source, you need to have some basic SQL knowledge. You can get a long way with internet search but you need to at least have a basic understanding of SQL concepts like SELECT, INNER JOIN, OUTER JOIN, IFNULL. You by no means need to be a SQL Expert.
  • Ensure right client version: Before you start developing, you need to have connectivity from the Asset Converter to the database, especially if the connection is remote. All databases need a Client installed locally to the Asset Converter if it is remote to the database. It is important that you make yourself familiar with the connection needs and get it configured right before you start developing.

...

Please keep a copy of the original template, as you need it every time you need to add a new section in your new template. Before you start you should fill in the Origin and the Asset Converter section with the information for the template.

It is recommended that you build the template section for section e.g. Build the <software></software> section then test then build the ONE <group></group> then test… and so on. For each test, you should try not to do more than one or two queries at the time, in . In that way you can quickly identify errors in a little section and not need to debug a full template with many queries.

...

  1. First build the query in the db tool.
  2. Copy the section from the original file into you your new file.
  3. Insert the new query in the query value.
  4. Modify the fields in the attributes tags.

...

  • Find the Asset query: As the Asset query is the key to all the section, it is important that you find the right ID that uniquely identifies the Asset, but also exists in all the inventory tables, so you can use it to link.
  • Build the basic general section: Once you have the Asset query, you should build the general section with at least host_name, default_hostname, default_address, default_mac.
  • Build a basic “system” group: The General Inventory -> System group is the most used inventory group when building a template. It holds some of the most important things like Serial Number, Host Name, Model, and Vendor. To start with you should build a basic group first with at least Hostname, Model, Vendor, and SerialNumber.
  • Build the Software Section:  The Software section is, in general, a small section that produces a lot of data with one query. By building the software section this early on you get the sense of how your full inventory import will look.

  • Build the full general section: If you did not build the full general section before, you should do it now, make . Make sure that you include the Serial_number and class_id.
  • Build the full ‘system’ group: If you did not build the full ‘system’ group section before, you should do it now, making . Make sure that you include fields like such as Processor Count and Total Memory.

  • Build the rest of the Hardware (Group): Once you have all the General information in place, you should build all the details hardware groups, as . As mentioned above, you should build it one group/query at the time by copying the section and fill in with the new query data.

You do not need to test the data in ITCM every time you build a new section, but it is recommended that you do spot check every now and then so that if you find an error, you can address it in small parts, and not need to debug the whole lot at once.


Appendix A:

Example

Exam
Table of Contents
maxLevel2
minLevel2
ple

This section shows a full example of an Altiris Template build based on the recommendations from the document.

NOTE: This is only an example if you need to du an Altiris import:

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<!--
Asset Converter Mapping Template for Altiris

This Mapping template for Altiris, using the AeX inventory tables both for Hardware and 
Software Inventory.
NOTE The Software Product name is the "Known as Name" Not the Product name. 


Version	    : 1.0.2		
Author	    : Kim Rasmussen Ca-Swat
Date	      : 22-oct-2009 		
Tested on   : Altiris 6.0.6074 		

History     : 1.0.0 : First version 
              1.0.1 : Added additional Total Memory and Serial number fields for viewing in the Overview
              1.0.2 : Changet the MAC Address format to use ':' as delimiters instead of '-'
-->

<asset-converter>
	<datasource type="DataBase">
		<subtype>10</subtype>
		<connection-properties>
			<property name="server">servername</property>
			<property name="database">Altiris</property>
			<property name="username">sa</property>
			<property name="port">1433</property>
			<property name="password">password</property>
			<property name="integratedsecurity">false</property>
		</connection-properties>

	</datasource>
	<output-settings>
		<dest-dir value="Altiris_assets"/>
		<output-filename value="Alt" host-name="true"/>
	</output-settings>
	<asset query="select _ResourceGuid AS GUID  from Inv_AeX_AC_Discovery" translator="ACBsFmt" version="1_0">
		<general query="select id.Name,REPLACE(tcp.[MAC Address],'-',':') AS MACAddress,tcp.[IP Address], id.[OS Name] as OSName, ISNULL(SN.[Serial Number],'') AS SNumb from inv_aex_ac_tcpip tcp,inv_aex_ac_identification id left outer Join Inv_AeX_HW_Serial_Number AS SN on SN._ResourceGUID=id._ResourceGUID where tcp._ResourceGuid = id._ResourceGuid and id._ResourceGuid = '{asset.Guid}'">
			<host_name  value="{general.Name}"/>
			<default_hostname  value="{general.Name}"/>
			<default_address value="{general.IP Address}"/>
			<default_mac value="{general.MACAddress}"/>
			<serial_number value="{general.SNumb}"/>
			<class_id value="{general.OSName}"/>
			<origin value="Altiris"/>
			<trustlevel value="4"/>
	      	</general>
		<hardware>
		<group name="AdditionalInventory">
                	<group name="Asset Coverter">
         			<attribute name="Name" value="Altiris.xml" type="string"/>
         			<attribute name="Version" value="1.0.2" type="string"/>
        	 		<attribute name="Comment" value="" type="string"/>
	        	</group>
         	</group>

	      	<group name="GeneralInventory">
	        	<group name="System" query="select ID.Name, case when SN.[Asset Tag]='Data not accessible' then '' else SN.[Asset Tag] end AS AssetTag, SN.[System Manufacturer] AS Vendor, SN.[Computer Model] AS Model, SN.[Serial Number] AS SNumb, CPU.Number as CPUCnt, CPU.Cores as CPUCores, convert(bigint,[Total Physical Memory (MB)]*1024)*convert(bigint,1024) as TotMem from inv_aex_ac_identification AS ID Inner Join Inv_AeX_HW_Serial_Number AS SN on SN._ResourceGUID=ID._ResourceGUID inner join Inv_AeX_HW_CPU_spt CPU on CPU._ResourceGUID=ID._ResourceGUID inner join Inv_AeX_HW_Memory as mem ON mem._ResourceGuid = id._ResourceGuid WHERE ID._ResourceGuid = '{asset.Guid}' ">
  				<attribute name="Hostname" type="string" value="{group(name='System').Name}"/>
	      	    		<attribute name="Asset Tag" type="string" value="{group(name='System').AssetTag}"/>
				<attribute name="Vendor" type="string" value="{group(name='System').Vendor}"/>
	         		<attribute name="Model" type="string" value="{group(name='System').Model}"/>
        	 		<attribute name="Serial Number" type="string" value="{group(name='System').SNumb}"/>
        	 		<attribute name="No. of Processors" type="int32" value="{group(name='System').CPUCnt}"/>
        	 		<attribute name="No. of Cores" type="string" value="{group(name='System').CPUCores}"/>
	                        <attribute name="Total Memory" type="int64" subtype="M" value="{group(name='System').TotMem}"/>
				<group name="Processors" query="select CPU._ResourceGUID, CPUDes.Type, CPUDes.Speed from Cmn_HW_CPU_Common CPUDES inner JOIN dbo.Inv_AeX_HW_CPU_spt AS CPU on CPU._KeyHash=CPUDES._KeyHash WHERE CPU._ResourceGuid = '{asset.Guid}'"> 
	    			      <attribute name="Speed" type="int32" value="{group(name='Processors').speed}"/>
				      <attribute name="Type" type="string" value="{group(name='Processors').type}"/>
                	      	</group>
                        	<group name="Memory" query="SELECT convert(bigint,[Total Physical Memory (MB)]*1024)*convert(bigint,1024) as TotMem FROM Inv_AeX_HW_Memory WHERE _ResourceGuid = '{asset.Guid}'"> 
	                              <attribute name="Physical Memory" type="int64" subtype="M" value="{group(name='Memory').TotMem}"/>
                	      	</group>
				<group name="System BIOS" query="SELECT [BIOS Vendor] AS Vendor, [BIOS Version] AS Ver, [BIOS Release Date] AS BDate FROM Inv_AeX_HW_BIOS WHERE _ResourceGuid = '{asset.Guid}'"> 
	                              <attribute name="Vendor" type="string" value="{group(name='System BIOS').Vendor}"/>
    				      <attribute name="Version" type="string" value="{group(name='System BIOS').Ver}"/>
 				      <attribute name="Install Date" type="string" value="{group(name='System BIOS').bdate}"/> 	
                      		</group>
			</group>

 			<group name="Network" query="select ID.Name, ID.Domain from inv_aex_ac_identification AS ID WHERE ID._ResourceGuid = '{asset.Guid}' ">
         			<attribute name="Computer Name" type="string" value="{group(name='Network').Name}"/>
         			<attribute name="Domain Name" type="string" value="{group(name='Network').Domain}"/>
         	 		         		
         			<group name="TCP/IP" query="SELECT REPLACE([MAC Address],'-',':') AS MACAddress, [IP Address] AS IPAddress, [Subnet Mask] AS SubNetMask, [Default Gateway] AS DefaultGateway, Subnet, DHCPEnabled, [DHCP Server] AS DHCPServer, Device, [Host Name] AS HostName, [Primary DNS Suffix] AS DNSDomain, [WINS Proxy Enabled] AS WINS, [DNS Server 1] AS DNS1, [DNS Server 2] AS DNS2, [Primary WINS Server] AS PrimWINS, [Secondary WINS Server] AS SecWINS FROM Inv_AeX_AC_TCPIP WHERE _ResourceGuid = '{asset.Guid}'">
         				<attribute name="MAC Address" type="string" value="{group(name='TCP/IP').MACAddress}"/>
         				<attribute name="IP Address" type="string" value="{group(name='TCP/IP').IPAddress}"/>
         				<attribute name="Subnet Mask" type="string" value="{group(name='TCP/IP').SubnetMask}"/>
         				<attribute name="Default Gateway" type="string" value="{group(name='TCP/IP').DefaultGateway}"/>         			
         				<attribute name="Subnet" type="string" value="{group(name='TCP/IP').Subnet}"/>
         				<attribute name="DHCP" type="boolean" subtype="normal" value="{group(name='TCP/IP').DHCPEnabled}"/>
         				<attribute name="DHCP Server" type="string" value="{group(name='TCP/IP').DHCPServer}"/>         			         			
         				<attribute name="Device Name" type="string" value="{group(name='TCP/IP').Device}"/>         			         			
         				<attribute name="Host Name" type="string" value="{group(name='TCP/IP').HostName}"/>         			         			
         				<attribute name="Domain" type="string" value="{group(name='TCP/IP').DNSDomain}"/>         			         			
         				<attribute name="WINS" type="string" value="{group(name='TCP/IP').WINS}"/>         			         			
         				<attribute name="Domain Name Server" type="string" value="{group(name='TCP/IP').DNS1}, {group(name='TCP/IP').DNS2}"/>         			         			
         				<attribute name="Primary WINS Server" type="string" value="{group(name='TCP/IP').PrimWINS}"/>         			         			
         				<attribute name="Secundary WINS Server" type="string" value="{group(name='TCP/IP').SecWINS}"/>         			         			     			         			
         			</group>
         		</group>
         		<group name="System Devices">
	         		<group name="Sound Adapter" query="SELECT  CMN.Description, CMN.Class, CMN.Type, CMN.Manufacturer, CMN.Enumeration FROM Inv_AeX_OS_System_Devices_spt AS INV INNER JOIN Cmn_OS_System_Devices_Common AS CMN ON CMN._KeyHash = INV._KeyHash WHERE INV._ResourceGuid = '{asset.Guid}' AND CMN.Enumeration = 'ISAPNP'">
         				<attribute name="Model" type="string" value="{group(name='Sound Adapter').Type}"/>
         				<attribute name="Vendor" type="string"  value="{group(name='Sound Adapter').Manufacturer}"/>         			
	         		</group>
				<group name="Video Adapters" query="SELECT CMN.Description, CMN.Drivers, INV.[Video RAM] AS VideoRam FROM Inv_AeX_HW_Video_spt AS INV INNER JOIN Cmn_HW_Video_Common AS CMN ON CMN._KeyHash = INV._KeyHash WHERE INV._ResourceGuid = '{asset.Guid}'">
					<attribute name="Model" type="string" value="{group(name='Video Adapters').Description}"/>
					<attribute name="Driver" type="string" value="{group(name='Video Adapters').Drivers}"/>
					<attribute name="Memory Size" type="int32" subtype="K" value="{group(name='Video Adapters').VideoRam}"/>
         			</group>         		
				<group name="Network Adapter" query="SELECT Device, [MAC Address] AS MACAddress FROM Inv_AeX_AC_TCPIP WHERE _ResourceGuid = '{asset.Guid}'">
					<attribute name="Model" type="string" value="{group(name='Network Adapter').Device}"/>
					<attribute name="MAC Address" type="string" value="{group(name='Network Adapter').MACAddress}"/>
				</group>
         			<group name="PCI Adapters" query="SELECT  CMN.Description, CMN.Class, CMN.Type, CMN.Manufacturer, CMN.Enumeration FROM Inv_AeX_OS_System_Devices_spt AS INV INNER JOIN Cmn_OS_System_Devices_Common AS CMN ON CMN._KeyHash = INV._KeyHash WHERE INV._ResourceGuid = '{asset.Guid}' AND CMN.Enumeration = 'PCI'">
         				<attribute name="Model" type="string" value="{group(name='PCI Adapters').Description}"/>
         				<attribute name="Vendor" type="string"  value="{group(name='PCI Adapters').Manufacturer}"/>        			         			
         			</group>
         			<group name="USB Controller" query="SELECT  CMN.Description, CMN.Class, CMN.Type, CMN.Manufacturer, CMN.Enumeration FROM Inv_AeX_OS_System_Devices_spt AS INV INNER JOIN Cmn_OS_System_Devices_Common AS CMN ON CMN._KeyHash = INV._KeyHash WHERE INV._ResourceGuid = '{asset.Guid}' AND CMN.Enumeration = 'USB'">
         				<attribute name="Model" type="string" value="{group(name='USB Controller').Description}"/>
         				<attribute name="Vendor" type="string"  value="{group(name='USB Controller').Manufacturer}"/>
         			</group>
         		</group>
 			<group name="Operating System" query="SELECT OS.[Service Pack] SP, OS.[Install Path] AS InstallPath, OS.Architecture, OSDesc.[OS Name] AS OSName, OSDesc.Version, OSDesc.[Product ID] ProdID, OSDesc.Build FROM Inv_AeX_OS_Operating_System_spt AS OS INNER JOIN Cmn_OS_Operating_System_Common AS OSDesc ON OS._KeyHash = OSDesc._KeyHash WHERE OS._ResourceGuid = '{asset.Guid}'">
				<attribute name="Operating System" type="string" value="{group(name='Operating System').OSName}"/>
				<attribute name="Version" type="string" value="{group(name='Operating System').Version}"/>
				<attribute name="Service Pack" type="string" value="{group(name='Operating System').SP}"/>
	         	</group>
	         	<group name="File System">
        	 		<group name="Local File System" query="SELECT [Device ID] AS Drive, Name, [Volume Name] AS Volume, Description, [File System] AS FileSystem, convert(bigint,[Free Space in MBytes]*1024)*convert(bigint,1024) AS Free, CASE WHEN [Size in MBytes] > 0 THEN ([Size in MBytes] - [Free Space in MBytes]) * 100 / [Size in MBytes] ELSE 0 END AS used_percent, convert(bigint,[Size in MBytes]*1024)*convert(bigint,1024) AS Size, [System Name] AS SysName, [Volume SerialNumber] AS SerialNumber FROM Inv_AeX_HW_Logical_Disk WHERE _ResourceGuid = '{asset.Guid}'">
					<attribute name="Mount Point" type="string" value="{group(name='Local File System').Drive}"/>
					<attribute name="Name" type="string" value="{group(name='Local File System').Name}"/>
					<attribute name="Volume Label" type="string" value="{group(name='Local File System').Volume}"/>
					<attribute name="Type" type="string" value="{group(name='Local File System').Description}"/>
					<attribute name="File System" type="string" value="{group(name='Local File System').FileSystem}"/>
					<attribute name="Free" type="int64" subtype="byte" value="{group(name='Local File System').Free}"/>
					<attribute name="Used %" type="int32"  value="{group(name='Local File System').used_percent}"/>
					<attribute name="Size" type="int64" subtype="byte" value="{group(name='Local File System').Size}"/>
					<attribute name="Serial Number" type="string" value="{group(name='Local File System').SerialNumber}"/>
         			</group>
	         	</group>
	         	<group name="Storage">
        	 		<group name="Fixed Drives" query="SELECT Name, Description, convert(bigint,[Size (MB)]*1024)*convert(bigint,1024) AS Size, [Number Of Cylinders] AS Cyl, [Bytes per Sector] AS BytePrSec, [Sectors per Track] AS SecPrTrack, [Tracks per Cylinder] AS TrackPrCyl, [Drive Letters] AS Letter, [System Drive] AS Drive FROM Inv_AeX_HW_Physical_Disk WHERE _ResourceGuid = '{asset.Guid}'">
         				<attribute name="Device" type="string" value="{group(name='Fixed Drives').Name}"/>
         				<attribute name="Model" type="string" value="{group(name='Fixed Drives').Description}"/>
         				<attribute name="Size" type="int64" subtype="byte" value="{group(name='Fixed Drives').Size}"/>
         				<attribute name="Cylinder" type="int32" value="{group(name='Fixed Drives').Cyl}"/>
         				<attribute name="Bytes Per Sector" type="int32" value="{group(name='Fixed Drives').BytePrSec}"/>
         				<attribute name="Sectors Per Track" type="int32" value="{group(name='Fixed Drives').SecPrTrack}"/>
         				<attribute name="Track Per Cylinders" type="int32" value="{group(name='Fixed Drives').TrackPrCylSize}"/>
         				<attribute name="Drive" type="string" subtype="string" value="{group(name='Fixed Drives').Drive}"/>
	         		</group>
				<group name="CD-Rom Drives" query="SELECT  CMN.Description, CMN.Class, CMN.Type, CMN.Manufacturer, CMN.Enumeration FROM Inv_AeX_OS_System_Devices_spt AS INV INNER JOIN Cmn_OS_System_Devices_Common AS CMN ON CMN._KeyHash = INV._KeyHash WHERE INV._ResourceGuid = '{asset.Guid}' AND CMN.Description LIKE '%CD-ROM%'">
         				<attribute name="Model" type="string" value="{group(name='CD-Rom Drives').Type}"/>
         				<attribute name="Vendor" type="string"  value="{group(name='CD-Rom Drives').Manufacturer}"/>
         			</group>
         		</group>
 	      	</group>
	      	</hardware>
  	<software>
  		<package name="{package.KnownAs}" query="SELECT INV.[File Path] AS FilePath, SW.Manufacturer, SW.ProductName, SW.ProductVersion, SW.[File Name] AS FileName, SW.KnownAs FROM Inv_AeX_SW_Audit_Software_spt AS INV INNER JOIN Cmn_SW_Common AS SW ON INV._KeyHash = SW._KeyHash WHERE INV._ResourceGuid = '{asset.Guid}' AND LTRIM(RTRIM(SW.KnownAs)) != '(null)'">
       	<attribute name="Ver" type="string" value="{package.ProductVersion}"/>
  		  <attribute name="Pub" type="string" value="{package.Manufacturer}"/>
  			<attribute name="Path" type="string" value="{package.FilePath}" />
  			<attribute name="FileName" type="string" value="{package.FileName}" />
  		</package>
  	</software> 	
  </asset>
</asset-converter>