DX NetOps

 View Only
  • 1.  Data Collector Devices down list export

    Posted Aug 05, 2021 05:10 AM
    Hi,

    What is the possibility to export the device list by filtering devices up down status? does anyone have an idea on this



    Thanks,
    Uchira.


  • 2.  RE: Data Collector Devices down list export

    Posted Aug 05, 2021 09:24 AM
    You can get the device down details from on-demand report using reachability kind of metrics


  • 3.  RE: Data Collector Devices down list export

    Broadcom Employee
    Posted Aug 05, 2021 05:49 PM
    In addition to a Reachability report, you could make a rest call to DA (depending on how many are down and/or mgmt loss - adjust the following depending on needs).

    POST http://DA:8581/rest/devices/filtered
    Body:
    <FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
    <Filter>
     <Or>
       <Device.ContactStatus type="EQUAL">MANAGEMENT_LOST</Device.ContactStatus>
       <Device.ContactStatus type="EQUAL">DOWN</Device.ContactStatus>
     </Or>
    </Filter>
    <Select use="exclude" isa="exclude">
      <Item use="exclude">
        <Name use="include"/>
      </Item>
      <Device use="exclude">
       <PrimaryIPAddress use="include"/>
       <ContactStatus use="include"/>
       </Device>
    </Select>
    </FilterSelect>


  • 4.  RE: Data Collector Devices down list export

    Posted Aug 05, 2021 06:27 PM
    Hi, I was testing this solution and got this error in response.

    <WebServiceException>
        <LocalizedMessage>The web service request failed because the XML provided in the request's body did not conform to the defined schema (see the documentation at 'devices/documentation' for access to the schema definitions).The specific error was: "Error on line 1: cvc-elt.1.a: Cannot find the declaration of element 'FilterSelect'.".</LocalizedMessage>
    </WebServiceException>

    Any thoughts?


  • 5.  RE: Data Collector Devices down list export

    Posted Aug 05, 2021 07:32 PM
    Found it... the message viewed in email (MS Outlook Web) hides the "http://" on the first line.

    It works now.


  • 6.  RE: Data Collector Devices down list export

    Posted Aug 06, 2021 07:49 AM
    Hi Jeffrey,

    It is POST or GET , when i tried i am not getting any results


  • 7.  RE: Data Collector Devices down list export

    Broadcom Employee
    Posted Aug 06, 2021 10:26 AM
    I mentioned POST in my example previously.


  • 8.  RE: Data Collector Devices down list export

    Posted Aug 06, 2021 10:33 AM
    But when i tried with the URL and with the BODY i am not returning any output although i have some alerts


  • 9.  RE: Data Collector Devices down list export

    Broadcom Employee
    Posted Aug 06, 2021 01:00 PM

    Does it just return?

    <DeviceList />

    You can try replacing the filter part with:

    <Filter>
      <Or>
        <Device.CalculatedContactStatus type="EQUAL">MANAGEMENT_LOST</Device.CalculatedContactStatus>
        <Device.CalculatedContactStatus type="EQUAL">DOWN</Device.CalculatedContactStatus>
      </Or>
    </Filter>