cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
763
Views
0
Helpful
3
Replies

LMS 3.2 duplicate devices after import

CJasztrabTMW
Level 1
Level 1

Recently I tried to do a bulk import of devices in my DCR.  What I did was to export all the data into a CSV file, modify the hostname and display name so i could put an identifier on there, and then re-import in the database.  Instead of updating all the devices it added duplicates in for them all.  How do I resolve this so I dont have the duplicates.

Chris

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

What fields are populated for these devices?

The following fields were exported and had values.  I changed host_name and display_name to different values and reimported the csv file.  I now have duplicate devices for each router.  One for example is 0001_RTR.company.com and the other is MSP_0001_RTR.company.com.  The MSP_ is the part i added onto the hostname and display name.   management_ip_address      host_name      domain_name      display_name      sysObjectID      mdf_type      snmp_v2_ro_comm_string      snmp_v2_rw_comm_string primary_password primary_enable_password   chris

DCR is using the display name attribute as the unique identifier for devices.  Therefore, when you change that field, DCR thinks the device entry is new.  I filed CSCtf29117 to request an enhancement to allow exporting of the DCR device ID which would facilitate being able to change display name in bulk like this.

As a workaround in the time being, you would need to use the web interface to change the display name of each device individually.  You could also script the dcrcli command line interface to update.  For example, get all the DCR IDs using the lsids command, then foreach one, update the display_name attribute.  In pseudo-code:

foreach id $(dcrcli -u admin cmd=lsids all)

do

    current_display_name = get_disp_name($id)

    dcr_id = get_dcr_id($id)

    dcrcli -u admin cmd=mod id=$dcr_id -a display_name="MSP_$current_display_name"

done

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: