SNMP attributes from REST APIs

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 05:01 AM - edited 03-01-2019 03:44 AM
Hi
I am using couple of DNAC REST APIs to see if I can possibly retrieve SNMP attributes of devices managed by DNAC. But these don't seem to return these attributes, I am interested in sysObjectId, sysName, etc. Any pointers?
The 2 APIs are:
- https://stld-dnac-2.cisco.com/api/v1/snmp-property (This probably returns more of DNAC specific properties, I don’t see any such device specific API)
Response:
{
"response": [
{
"intValue": 3,
"systemPropertyName": "Retry",
"instanceTenantId": "5b3466e689c19e008805210f",
"instanceUuid": "879f5499-ffa3-4461-bd0a-7c7b6d66d97a",
"id": "879f5499-ffa3-4461-bd0a-7c7b6d66d97a"
},
{
"intValue": 12,
"systemPropertyName": "Timeout",
"instanceTenantId": "5b3466e689c19e008805210f",
"instanceUuid": "b0ad7f75-6afc-4de8-af84-7fc077fe25dd",
"id": "b0ad7f75-6afc-4de8-af84-7fc077fe25dd"
}
],
"version": "1.0"
}
2. https://stld-dnac-2.cisco.com/api/v1/network-device/ (Returns device properties, but again don’t see any relevant snmp attributes in the response)
{
"response": [
{
"type": "Cisco 2800I Unified Access Point",
"location": null,
"errorCode": "null",
"family": "Unified AP",
"collectionInterval": "NA",
"tagCount": "0",
"role": "ACCESS",
"lastUpdateTime": 1535541651421,
"roleSource": "AUTO",
"associatedWlcIp": "100.207.32.11",
"bootDateTime": null,
"collectionStatus": "Managed",
"interfaceCount": null,
"lineCardCount": null,
"lineCardId": null,
"managementIpAddress": "100.204.32.32",
"memorySize": "NA",
"platformId": "AIR-AP2802I-B-K9",
"reachabilityFailureReason": "NA",
"reachabilityStatus": "Reachable",
"series": "Cisco 2800I Series Unified Access Points",
"snmpContact": "",
"snmpLocation": "default location",
"tunnelUdpPort": "16666",
"waasDeviceMode": null,
"apManagerInterfaceIp": "100.207.32.11",
"softwareType": null,
"hostname": "APCC16.7EF0.70BC",
"upTime": "22days 10:45:28.700",
"macAddress": "00:2a:10:bf:3a:e0",
"lastUpdated": "2018-08-29 11:20:51",
"serialNumber": "FDW2028B0WV",
"softwareVersion": "8.5.135.0",
"inventoryStatusDetail": "NA",
"locationName": null,
"errorDescription": null,
"instanceTenantId": "SYS0",
"instanceUuid": "63f4ab23-1a07-4184-af10-292c4d4a7523",
"id": "63f4ab23-1a07-4184-af10-292c4d4a7523"
},
…
- Labels:
-
Cisco DNA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2018 05:50 AM
Umesh,
I see those SNMP attributes gathered during the inventory sync but as you mentioned they are not all shown in the API for getting device information. The sysName is included in the API response as the hostname. The other SNMP attributes may be stored in the postgres db and possibly be extracted but probably easier to use the API to get the list of all the network devices and glean out the management IP and then run SNMP queries against the devices themselves using a script.
Regards
T.
