How to get a list of Data Aggregator devices with a specific status ?

Document created by Lutz_Holzbecher Employee on Mar 18, 2015Last modified by SamCreek on Dec 17, 2016
Version 2Show Document
  • View in full screen mode

If you need to process devices with a specific status like Down or Unknown, you can retrieve a list in XML format from the Data Aggregator REST web service.

The output corresponds to the device status in the DA User Interface under System Status / Data Collector List.

 

Prerequisites:

  1. a REST client (browser based or client installation)
  2. access to Data Aggregator web service http://DA:8581/rest

 

REST client options:

 

These are the steps - see also the screenshot attached

  1. Enter the URL: http://<DA-HOST>:8581/rest/devices/filtered
  2. select method: POST
    Body: select raw (POSTMAN) or string body (restclient-ui)
  3. enter header:  Content-Type = application/xml
  4. paste the following XML underneath:

<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
<Filter>
<And>
<Device.CalculatedContactStatus type="EQUAL">DOWN</Device.CalculatedContactStatus>
</And>
</Filter>
<Select use="exclude">
  <Item use="exclude">
     <Name use="include"/>
  </Item>
  <Device use="exclude">
   <PrimaryIPAddress use="include"/>
  </Device>
</Select>
</FilterSelect>

 

5. define the status value according to your needs (DOWN, UNKNOWN, UP ...)

6. click Send (POSTMAN) / Go! (restclient-ui)

7. Verify the status
8. review the result

 

NOTES:
The provided FilterSelect example uses the CalculatedContactStatus as filter criteria and returns, among device name and ID, the PrimaryIPAddress as specified
in the Select branch. Please refer to http://<DA-HOST>:8581/rest/devices/documentation if you need to change criteria or output attributes.

 

  

Your feedback is appreciated so please post any comments in this thread.  As with all free Infrastructure Management Field Developed Utility postings, inquiries should be made through questions or comments in this thread, and the author, Lutz_Holzbecher, will provide a response.

2 people found this helpful

Attachments

Outcomes