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:
- a REST client (browser based or client installation)
- access to Data Aggregator web service http://DA:8581/rest
REST client options:
These are the steps - see also the screenshot attached
- Enter the URL: http://<DA-HOST>:8581/rest/devices/filtered
- select method: POST
Body: select raw (POSTMAN) or string body (restclient-ui) - enter header: Content-Type = application/xml
- 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.