ONTAP Rest API Discussions

What other requirements are needed for getting "top-metrics" API call to work properly?

KVAN
343 Views

What other requirements are needed for getting "top-metrics" API call to work properly?

 

Specifically, any/all these Storage GET API top-metrics calls:

  • GET /storage/volumes/{volume.uuid}/top-metrics/users
  • GET /storage/volumes/{volume.uuid}/top-metrics/directories
  • GET /storage/volumes/{volume.uuid}/top-metrics/clients
  • GET /storage/volumes/{volume.uuid}/top-metrics/files

Assume all of the following is already true:

  • Authentication access is working properly.
  • volume.uuid is correctly mapped to valid volume uuid record
  • Activity on any given file, folder directory, user, and client has been previously and continuously done
    • Performance shows usage activity for Latency, IOPS, Throughput on monitoring graph from UI
  • Windows CIFS type volume share
  • Read/Write type enabled on volume share
  • Activity Tracking & Analytics Enabled
  • ONTAP System Manager 9.13.1P2

Response Error Message Given At Time Of API Call (From Swagger/Postman):

  • Volume Share Name: TestVolumeShare
  • Storage VM Name: TestingStorageVM
  • Response Message:
    • "message": "The activity tracking report for volume \"TestVolumeShare\" in SVM \"TestingStorageVM\" returned zero records. Check whether the volume has read/write traffic. Refer to the REST API documentation for more information on why there might be no records.",
      "code": "124518418"
    • 124518418 The activity tracking report for volume volume.name in SVM svm.name returned zero records. Check whether the volume has read/write traffic. Refer to the REST API documentation for more information.
    • All/Any of the following top-metrics API calls produce the same type of response message

 

The REST API documentation has been reviewed and does not list any other configuration information requirements or other trouble shooting action items to do or try. Our goal is to use the API to help track and automate user, file, directory and or client information on usage for on-going efforts. If anyone has any input or experience on this topic, please let us know your thoughts on how you were able to successfully able to require the proper information through the listed API calls, thanks!  

 

Error Example Response:

{
"records": [],
"num_records": 0,
"notice": {
"message": "The activity tracking report for volume \"TestVolumeShare\" in SVM \"TestingStorageVM\" returned zero records. Check whether the volume has read/write traffic. Refer to the REST API documentation for more information on why there might be no records.",
"code": "124518418"
},
"_links": {
"self": {
"href": "/api/storage/volumes/123a9990-4321-11ee-a1ca-z039ea9e9876/top-metrics/users?return_timeout=15"
}
}
}

 

Successful Example Response:

{  "_links": {    "next": {      "href": "/api/resourcelink"
    },
    "self": {      "href": "/api/resourcelink"
    }
  },
  "incomplete_response_reason": {    "code": "111411207",    "message": "Partial data has been returned for this metric report. Reason: The activity tracking report for this volume is not available because the system is busy collecting tracking data."
  },
  "notice": {    "code": "111411207",    "message": "No read/write traffic on volume."
  },
  "num_records": 1,  "records": [    {
      "iops": {        "error": {          "lower_bound": 10,          "upper_bound": 11
        },
        "read": 10,        "write": 5
      },
      "svm": {        "name": "vserver_3",        "uuid": "42ee3002-67dd-11ea-8508-005056a7b8ac"
      },
      "throughput": {        "error": {          "lower_bound": 2,          "upper_bound": 3
        },
        "read": 2,        "write": 1
      },
      "user_id": 1876,      "user_name": "Ryan",      "volume": {        "name": "vol_9",        "uuid": "c05eb66a-685f-11ea-8508-005056a7b8ac"
      }
    }
  ]
}

 

0 REPLIES 0
Public