How to create a Data Connector import rule to automatically assign computers or users to locations

book

Article ID: 181511

calendar_today

Updated On:

Products

CMDB Solution

Issue/Introduction

 

Resolution

A Data Connector import rule can be used to automatically assign computers or users. This is accomplished by updating the location association of the respective asset. The following instructions demonstrate how do to this. Notes: (1) The customer can adapt these instructions to automatically assign any applicable asset to locations, such as monitors, and to other association types, such as departments or cost centers instead of locations (where applicable). (2) Locations must already exist before this import rule will work. If not, refer to the following article on how to first create locations before continuing this the below instructions:

How to create locations and automatically assign them to computers or users
http://www.symantec.com/business/support/index?page=content&id=HOWTO85119

Part 1: Create a Data File

The customer will need to generate their own .CSV or Excel file that contains a list of the assets they wish to import and assign locations to. Depending on the data classes that are desired to be imported, this file's contents can be as simple as just having the asset names, to having many fields. The following provides an example of a .CSV file that can be used to computers and assign them to locations:

Computer Name, Serial Number, Location
PC1, 111222, Lindon
PC2, AAABBB, Springfield

This example includes multiple column names with two records that have values for the columns.

Part 2: Create a Data Source
 

  1. In the Symantec Management Platform Console, click on the Settings button > All Settings.
  2. lick to expand the folders Notification Server > Connector > Data Sources.
  3. Right click on the Data Sources folder and then click on New > CSV File Data Source. Note: The remainder of these instructions refer to using a .CSV file. If an Excel data file is used instead, instead use an OLEDB data source, and make the appropriate changes in the data source as applicable.
  4. Click in the New CSV File Data Source title at the top of the data source page to change its name.
  5. Click on the "Allow import" check box to enable it.
  6. Click on the Browse button for the "Import from file" field.
  7. Locate and select the data file created in Part 1, and then click on the Open button.
  8. Click on the "View import data" to verify that the columns and data records appear as expected. If not, adjust the data file accordingly.
  9. Click on the "Save changes" button. The data source should then look similar to the following example:

     

Part 3: Create an Import Rule
 

  1. In the Symantec Management Platform Console, still in All Settings from Part 2, click to expand the folder Import/Export Rules.
  2. Right click on the Import/Export Rules folder and then click on New > Resource Import Export Rule.
  3. Click in the New Resource Import Rule title at the top of the import rule page to change its name.
  4. Click on the "Data source" drop-down list and select the data source created in Part 2.
  5. Click on the "Resource type" drop-down list and select the type of resource to import, such as Computer or User. The remainder of these instructions will use Computer.
  6. Click on the "Resource lookup key" drop-down list and select Resource Name.
  7. Click on the Name drop-down list and select the column name from the data file that was used for Computers, such as Computer Name.
  8. If only updates are to be performed, uncheck "Create resources if doesn't exist" checkbox.
  9. The "Resource name" drop-down list should now be set to the Name field's value (and disabled from being able to be manually changed). If not, click on the "Save changes" button to refresh this field's value.
  10. In the "Assignment mappings" section, for the Location association, click on the "Look-up key" drop-down list and select Resource Name.
  11. For the Location's "Key column mappings" drop-down list, click on this and select Location.
  12. The customer can choose to also assign any additional data classes and associations as desired or leave them blank if not desired. For example, the import screenshot below demonstrates how to just import a computer's serial number and make a location assignment:



     
  13. Click on the "Save changes" button.
  14. Click on the "Test rule" button. The Connector Rule Run Status window appears. Note: Before running this on a production server, ensure that the "Test rule" button is used to verify that the data to be imported is what is expected.
  15. When ready to begin a live import, click on the "Run now" button. This imports or updates the assets and assigns them locations as set forth by the customer's data file.


Related Articles

How to create a CMDB rule to automatically assign locations to computers or users
http://www.symantec.com/business/support/index?page=content&id=HOWTO85126

How to create a Data Connector import rule to automatically assign computers or users to locations
http://www.symantec.com/business/support/index?page=content&id=HOWTO85129

Import Rule fails to set or removes Asset Owner or Cost Center
http://www.symantec.com/business/support/index?page=content&id=TECH170991

Data Connector import rule fails to import associations such as Asset Owners, Cost Centers, Departments or Locations
http://www.symantec.com/business/support/index?page=content&id=TECH215869

Attachments