How do you find devices not associated to specific data collectors

Document ID : KB000111938
Last Modified Date : 22/08/2018
Show Technical Document Details
Question:
How do you find devices not associated to specific data collectors?
Answer:
The below query can be run from the DA's command line and it will display the IP Addresses of the devices that are NOT associated to the MDRItemID of DCs ID1, ID2, & ID3.  You will need to change ID1, ID2 and ID3 to the MRDItemID of your good DCs: 

curl --header "Content-Type: application/xml" --request POST --data '<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd"><Filter><Not><Or><Item.MDRItemID type="EQUAL">ID1</Item.MDRItemID><Item.MDRItemID type="EQUAL">ID2</Item.MDRItemID><Item.MDRItemID type="EQUAL">ID3</Item.MDRItemID></Or></Not></Filter><Select use="exclude" isa="exclude"><Device><PrimaryIPAddress use="include"></PrimaryIPAddress></Device></Select></FilterSelect>' --url http://127.0.0.1:8581/rest/devices/filtered