Create Monitor Assets and Associate with Computer

Create Monitor Assets and Associate with Computer
Alon's picture

Inventory will collect information about the monitor that is attached to the desktop. Why not take that information and create a Monitor asset and then associate it with the computer that it is attached to.

This article uses the following solutions:

  • Connector Solution
  • CMDB Solution

Here is the high level of what we'll do:

  • query the Altiris database (Inv_Aex_HW_Monitor table) for monitor entries
  • create an asset for the Monitor found, namely using the serial number as the identifier
  • associate the newly created monitor with the computer it was found on

First you need to define your Data Source in the Connector Solution. To do this create a System DSN for the Altiris database. You will need this for the data source definition.

Next define the data source. Navigate to Configuraiton-->Solution Settings-->Connectors-->Data Sources-->(right click, new ODBC data source). The query should be:

select * from Inv_AeX_HW_Monitor where [serial number] <> ''

This will give you a list of all monitors that Inventory has colleted.

Next you need to create the import rule. Right click on Import/Export Rules and select Resource Import Export Rule. Enter the following information:

Data Source: the data source you created in the first step

Replication Direction: import

Resource Type: Monitor

  • check "Allow Resource Creation"
  • check "Allow Resource Update"

Column Mappings

  • Resource Lookup Key - Serial Number and Serial Number (from both drop down boxes)
  • Manufacturer-->Manufacturer Name (from drop down)
  • Model-->Product Code (from drop down)
  • Comment-->Feature Support (from drop down)

Association Mapping --> Associated Assets

  • Lookup Key --> Resource Guid (from drop down)
  • Key Column Mappings --> _ResourceGuid (from drop down)

Here is the screen shot that shows it all:

The data classes that I used aren't too important for the creation of the Monitor asset except for Serial Number. Feel free to add/remove dataclasses as you see fit.

And that's it.

3.75
Average: 3.8 (28 votes)

excellent

vtww's picture

thank you for sharing this good stuff