When reassigning a data collector the following error is seen:
This DCM already has devices assigned to it ‘2’. - httpResponseCode: 400
When looking at the data collector in the NetOps user interface, there does not appear to be any devices associated to the collector
Any Performance Management environment
Retired devices are associated to the collector
To resolve the issue please do the following:
1. Create file /tmp/devices.xml with following syntax
<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
<Filter>
<Item.MDRItemID type="EQUAL">Data Collector ID</Item.MDRItemID>
</Filter>
<Select use="exclude" isa="exclude">
<Item use="exclude">
<Name use="include" />
</Item>
<Device use="exclude">
<Latitude use="include" />
<LocationDesc use="include" />
<Longitude use="include" />
<HostName use="include" />
<PrimaryIPAddress use="include" />
<ContactStatus use="include" />
<DiscProfileID use="include" />
</Device>
<Lifecycle use="include">
</Lifecycle>
</Select>
</FilterSelect>
2. To run run it use the following command:
curl -s -X POST -d @/tmp/dc.xml http://DAHost:8581/rest/devices/filtered --header "Content-Type: application/xml" | xmllint --format - > devices.log
3. Based on the output in devices.log, you can either delete or reassign the devices to other collectors. Once complete you should be able to reassign the data collector to another IP Domain without issue