I am trying to get the top file and top client by using the following API, but I can not retrieve data from API.
With the CLI, I got some detail in the attached image, but no data from API. Is there any thing I should change?
#statistics top file and top client API
1 messages · Page 1 of 1 (latest)
Have you read the documentation for the API call?
It says:
To obtain this list, only the volumes which have the activity tracking feature enabled are considered.
And then continues to describe how to enable it.
@ocean locust So with the command, I can get the statistics without enabling FSA, but if using API call, the FSA must be turned on to get the top statistics?
That is how I interpret the documentation as well, yeah.
But I don't know if FSA and "Activity tracking" is the same thing.
The document is to turn on the File system analytics, and that could infect the performance, so just wanna make sure are there other API call that has the same function as “statistics top file show”
The commands volume analytics on and volume activity-tracking on does not appear to be the same.
Yes, I mean File System activity tracking, will it effects performance when enabled?
@runic olive, Harvest 23.02 has an FSA dashboard that provides this information. You can check whether it is useful for your use case at https://github.com/NetApp/harvest/issues/1569.
I want to get the same result as the command "statistics top file show" and "statistics tip client show" by using RESTFUL API, but cannot find the related API
@runic olive, I don't see any REST API for this data. Additionally, the private CLI doesn't work as the statistics commands aren't exposed through private CLI REST calls.
@tight bluff does this API work the same way?
Yes this should be similar but you would need to call this API for each svm
@tight bluff But the document says that I have to enable activity tracking feature to track them by API, but that might affect performance. When using the command "statistics top file show", The activity tracking feature doesn't need to be enabled
Yes these APIs are for FSA. Ideally only enable for the volumes you want to track.
@tight bluff Also, I tried to get the nodes hosting the volume by giving svm_Name and vol_name, and it works from the command "vol show -volume <vol_name> -vserver <vserver_name> -fields node", but from the API "api/storage/volumes?name=<vol_name>&svm.name=<svm_name>&fields=*", I don't see the node attribute in the response json.
I don't see node being exposed though public Rest for volume API. You can try private CLI /api/private/cli/volume?volume=harvest&fields=node
@tight bluff I am using statistics top file show command with -node, but how to use this command with flexgroup, which doesn's have node info
I think they may be available as constituents but I haven't tested it.
I tried the command "statistics top file -node XXX", can multiple nodes be assigned in this command? I tried with "," to separate node_names but failed.
It is only 1 node
@tight bluff Then if using flexgroup, since only 1 node can be specified in the command, I can only get the whole cluster info(24 nodes), and the maximum number of output is limited to 100, it may not show the volume I want. Any suggestion?
I think /storage/volumes/{volume.uuid}/top-metrics/files is better suited for your use-case
@tight bluff This API needs to turn on the Activity tracking feature, which might impact the performance
Yes. I think statistics command also has performance impact. Probably an SME in this area would be best to comment on performance impact of these commands.
@tight bluff Is the API /storage/volumes/{volume.uuid}/top-metrics/files available for fg?
I tested with FG uuid, but nothing returned, and tested with CS uuid, also no return.