#statistics top file and top client API

1 messages · Page 1 of 1 (latest)

runic olive
#

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?

ocean locust
#

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.

runic olive
#

@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?

ocean locust
#

But I don't know if FSA and "Activity tracking" is the same thing.

runic olive
#

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”

ocean locust
#

The commands volume analytics on and volume activity-tracking on does not appear to be the same.

runic olive
#

Yes, I mean File System activity tracking, will it effects performance when enabled?

tight bluff
runic olive
tight bluff
#

@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.

runic olive
#

@tight bluff does this API work the same way?

tight bluff
#

Yes this should be similar but you would need to call this API for each svm

runic olive
#

@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

tight bluff
#

Yes these APIs are for FSA. Ideally only enable for the volumes you want to track.

runic olive
#

@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.

tight bluff
#

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

runic olive
#

@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

tight bluff
#

I think they may be available as constituents but I haven't tested it.

runic olive
#

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.

tight bluff
#

It is only 1 node

runic olive
#

@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?

tight bluff
#

I think /storage/volumes/{volume.uuid}/top-metrics/files is better suited for your use-case

runic olive
#

@tight bluff This API needs to turn on the Activity tracking feature, which might impact the performance

tight bluff
#

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.

runic olive
#

@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.