Report on all devices using SNMPV2

book

Article ID: 223717

calendar_today

Updated On:

Products

DX NetOps CA Performance Management - Usage and Administration

Issue/Introduction

How do I get a list of all devices using SNMPv2c?

Resolution

The only way is to use a filtered REST call via the Data Aggregator REST API.

Method:

POST

URL:

http(s)://daHostname:port/rest/devices/manageable/filtered

note: fill in for http/https, the daHostname, and port 8581/8582.

Body:

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

Header:

Content-Type = application/xml

Authorization (if 21.2.x):

admin/admin's password

 

The results will be an XML output something like the below with every matching device showing a code chunk like this:

<ManageableDevice version="1.0.0">
        <ID>6626</ID>
        <Item version="1.0.0">
            <Name>deviceHostname.xyz.acme.com</Name>
        </Item>
    </ManageableDevice>