cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
371
Views
0
Helpful
0
Replies
Highlighted
Beginner

APIC-EM Inventory REST call with SNMP v3

Hello,

 

I try to add a device to the inventory with the REST API call and I use SNMP v3.

I use the swagger with the following JSON record :


{
  "cliTransport": "ssh",
  "snmpAuthPassphrassshe": "Password",
  "snmpAuthProtocol": "sha",
  "snmpRetry": 3,
  "snmpVersion": "v3",
  "userName": "user",
  "password": "password",
  "ipAddress": [
    "10.40.6.19"
  ],
  "snmpMode": "AUTHNOPRIV",
  "snmpTimeout": 60,
  "snmpUserName": "V3UserRO"
}
The POST response is :

{
  "response": {
    "taskId": "867f9c13-863e-4cd7-810d-1b76d63f9e4f",
    "url": "/api/v1/task/867f9c13-863e-4cd7-810d-1b76d63f9e4f"
  },
  "version": "1.0"
}

ANd the Task service response :

{
  "response": {
    "version": 1542656644931,
    "startTime": 1542656644931,
    "endTime": 1542656644968,
    "progress": "",
    "serviceType": "Inventory service",
    "isError": false,
    "rootId": "867f9c13-863e-4cd7-810d-1b76d63f9e4f",
    "id": "867f9c13-863e-4cd7-810d-1b76d63f9e4f"
  },
  "version": "1.0"
}

In the Inventory the status is UNKOWN.

 

The GET inventory gets the following:

{
  "response": [
    {
      "family": null,
      "location": null,
      "type": null,
      "errorCode": "UNKNOWN",
      "serialNumber": null,
      "inventoryStatusDetail": "<status><general code=\"UNKNOWN\"/></status>",
      "role": "CORE",
      "upTime": null,
      "softwareVersion": null,
      "tagCount": "0",
      "hostname": null,
      "macAddress": null,
      "series": null,
      "lastUpdated": "2018-11-19 19:44:07",
      "collectionInterval": "Global Default",
      "lastUpdateTime": 1542656647335,
      "locationName": null,
      "errorDescription": "All information from the device could not be collected successfully or the inventory collection for this device has not yet started. It may be a temporary problem that will automatically correct. If the problem persists, please run the discovery again for the device and if that does not resolve the problem, please contact Cisco TAC to resolve the issue",
      "roleSource": "AUTO",
      "apManagerInterfaceIp": "",
      "bootDateTime": null,
      "collectionStatus": "Could Not Synchronize",
      "interfaceCount": null,
      "lineCardCount": null,
      "lineCardId": null,
      "managementIpAddress": "10.40.6.19",
      "memorySize": "NA",
      "platformId": null,
      "reachabilityFailureReason": "Collection Failure",
      "reachabilityStatus": "Unreachable",
      "snmpContact": null,
      "snmpLocation": null,
      "tunnelUdpPort": null,
      "instanceUuid": "accfdcb1-96a4-44c4-8b02-7d5f1933e4e3",
      "id": "accfdcb1-96a4-44c4-8b02-7d5f1933e4e3"
    }
  ],
  "version": "1.0"
}

When I use SNMP v2 it works and the device is in the inventory. Seem SNMP v3 is not working? Anybody any idea?

 

Kind reards

 

Uwe

 

Everyone's tags (1)
Content for Community-Ad
August's Community Spotlight Awards