How to get a list of pingable devices
search cancel

How to get a list of pingable devices

book

Article ID: 43629

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

How do I get a list of host names for pingable devices on the DX Netops Performance Management Data Aggregator

Environment

DX Netops Performance Management

Resolution

You can use a REST client to perform queries, to get this information


The first REST query will return the device ID, from which you can look up the device name

 URL:

  POST to http://DAHOST:8581/rest/devices/filtered

Additional Header:

Content-Type: application/xml

Body:

<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
    <Filter>
        <And>
            <Device.SupportedProtocols type="EQUAL">ICMP</Device.SupportedProtocols>
            <And>
                <Not>
                    <Device.SupportedProtocols type="EQUAL">SNMP</Device.SupportedProtocols>
                </Not>
                <Not>
                    <Item.Name type="CONTAINS">DataAggregator:</Item.Name>
                </Not>
            </And>
        </And>
    </Filter>
    <Select use="exclude" isa="exclude"/>
</FilterSelect>

Then you can search for device names, based on Device IDs, as follows

URL:

GET to http://DAHOST:8581/rest/<Item_ID>

 

You can also change the query as follows, to return more information per pingable device, including the hostname; without having to do separate hostname searches. This taxes the system more, as it returns more information for each pingable device, found

URL:

POST to http://DAHOST:8581/rest/devices/filtered 

Additional Header: 

Content-Type: application/xml 

Body: 

<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
    <Filter>
        <And>
            <Device.SupportedProtocols type="EQUAL">ICMP</Device.SupportedProtocols>
            <And>
                <Not>
                    <Device.SupportedProtocols type="EQUAL">SNMP</Device.SupportedProtocols>
                </Not>
                <Not>
                    <Item.Name type="CONTAINS">DataAggregator:</Item.Name>
                </Not>
            </And>
        </And>
    </Filter>
    <Select use="include" isa="exclude"/>
</FilterSelect>

You can also just include specific information in the output using the select portion:

<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
    <Filter>
        <And>
            <Device.SupportedProtocols type="EQUAL">ICMP</Device.SupportedProtocols>
            <And>
                <Not>
                    <Device.SupportedProtocols type="EQUAL">SNMP</Device.SupportedProtocols>
                </Not>
                <Not>
                    <Item.Name type="CONTAINS">DataAggregator:</Item.Name>
                </Not>
            </And>
        </And>
    </Filter>
    <Select use="exclude" isa="exclude">
        <Item use="exclude">
            <Name use="include"/>
        </Item>
    </Select>
</FilterSelect>


Additional Information

For more information on using REST WebServices, see:

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/performance-management/20-2/apis/data-aggregator-rest-webservices.html