Table of Contents | ||||
---|---|---|---|---|
|
This article describes a method to distinguish between different templates created for the various third party asset inventory tools and . It also provides guidelines for identifying the source or origin of discovery data imported using the ServiceAide Serviceaide Asset Converter. Examples of the various sources or origins might include Microsoft Systems Management Server (SMS) 2003, Microsoft System Center Configuration Manager (SCCM) 2007, Altiris Inventory Solution, BMC Configuration Management (formerly Marimba), LANDesk Inventory Manager, Tivoli Asset Management or BDNA Insight. Within various tools, there is often more than one method used for software inventory. An example is Microsoft SCCM Add/Remove Programs or Asset Intelligence.
The source or origin of discovered assets is tracked by the ServiceAide Serviceaide ITCM/SCM Content Team and is also displayed in ServiceAide Serviceaide IT Client Manager and in ServiceAide Serviceaide Software Compliance Manager. Further, additional planned functionality in SwCM depends on the source or origin of asset inventory data. It is also important to identify the source of inventory data in a consistent manner.
...
After you have built your template and you know that it works, you should add a number of identifications into to the template to tell them apart.
Origin and Trust Level
Origin is the official method to distinguish discovery data sources. As Origin is a free text field, it is important that you choose the right Origin. The Origin value should be long enough to provide a clear indication of the source (so that the reader can easily discern the source), but should be kept as short as possible so that it can be displayed on screen without requiring too much real estate. As an example, if you build a template for the current version of the third party inventory tool, uses a single inventory method; you should just use the name (i.e. “Altiris”). If the tool employs more than one inventory method, you should also indicate the source on the Template that deviate from the standard information that users use (i.e. “Altiris Add/Remove”).
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 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.
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> |
...
<!-- |
...
Asset Converter Mapping Template for Microsoft SCCM 2007 an on. |
...
(Based on the OOTB Provided SMS template sample) |
...
This Mapping template for MS-SCCM 2007. The big difference from the standard product "Asset Converter for Microsoft SMS" is that the Software Inventory is read from the Asset Intelligence data area |
...
Version : 0.9.1 |
...
Author : |
...
Username Serviceaide Date : 20-aug-2009 |
...
Tested on : SCCM 2007 SP1 (4.00.6221.1000) |
...
History : 0.9.0 : First version |
...
0.9.1 : (RASKI02) Added CPU Count |
...
→ |
...
<asset-converter> |
...
<datasource type="DataBase"> |
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).
Please note that comments are not currently supported inside the <asset></asset> section. Support for comments inside the <asset> section is expected in the future.
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 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>
|
You need not to include the Origin value in this section as it is already included in the General section described above (see 2.1Origin and Trust level). When the information is converted and collected, the Asset Converter section could look like this in the DSM Explorer.
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.
Sharing the Templates
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.
Tips and Tricks
This section contain experiences and recommendations from the field.
Overview
It is recommended that you provide as much information as possible in the General section.
The serial number that is displayed in the Overview page, on the Home tab, is defaulted from the internal table that is part of the registration and not from the system-> serial number.
To update the serial number in the Overview page, you must add the “serial_number” to the General section as well as to the System inventory.
Here is an example of how it could look when you add a “serial_number” tag in the General section:
Code Block |
---|
<general query="select sys.Name0,sys.Domain0,sys.SN,……….
…
…
<serial_number value="{general.SN}"/>
…
…
</general>
|
Remember to change the Query in the General section to include the data.
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.
To do this, you must change the <asset> query to include a “where” clause that query the LastLogin field. If we assume that the LastRunDate is a database “datetime” field and you would like to only take machines newer than 24 hours, you could add a line like this:
“WHERE datediff(hh, LastRunDate, getdate()) < 24”
Code Block |
---|
<asset query="select UID from MasterTable WHERE datediff(hh, LastRunDate, getdate()) < 24" translator="ACBsFmt" version="1_0"> |
In this case, you should build 2 identical templates with the only difference being the “last run” filter, keep the same Origin, and version but change the comment to describe that there Is a filter in one of the templates (see Asset Converter Inventory Section).
The Process of Writing a Template
This chapter provides some guidance and recommendations on how to approach template development.
Before You Start
Before you start building a template, you must ensure the following things to have an easy and efficient development process. It is by no means a full list and this will be updated as we get the feedback from the field.
- 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 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 import 10 assets:
Code Block |
---|
………
</datasource>
<processing-info>
<max-assets-to-process value="10"/>
</processing-info>
<output-settings>
……….
|
- Ensure you have good tools: There are many tools that can help you develop the template, but in general, there are 2 tools.
a. Database Tool: Depending on the database source, you must have a tool where you can develop SQL queries. Many inventory tools use Microsoft SQL. Microsoft SQL includes a tools called SQL Server Management studio that works well for building queries.
If you do not have a SQL tool you can use a tool that comes with Microsoft Office called MS-Query, it 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.
The Development Process
Once you have the prerequisites in place you can start building the template. It is recommended that you use an existing template that has the data fields included that you need in your template. Take a copy of the template and remove all the sections inside the Asset except the General section.
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 that way you can quickly identify errors in a little section and not need to debug a full template with many queries.
For each step/section you should:
- First build the query in the db tool.
- Copy the section from the original file into your new file.
- Insert the new query in the query value.
- Modify the fields in the attributes tags.
Below is the recommended order for building the template:
- 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 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. Make sure that you include fields 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 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: ExampleThis section shows a full example of an Altiris Template build based on the recommendations from the document. You can create a mapping file for a database and define the following mapping file parameters: NOTE: This is only an example if you need to import Altiris. All XML files you create, and the sample XML code used in this document must be well-formed and comply with XML and XSD standards. Datasource type: Enter datasource type "DataBase or database". Note: The Datasource tag has subtypes and connection properties tags. Subtype: Each database is assigned a predefined numeral as a unique code. The CA Asset Converter identifies a particular database on the associated codes and loads the property names required for the connection to the database. You can use any of the following codes:
|