Agent NetApp Ontap Qtree - Filter API call to include only type tree reports #888
+1
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
General information
There is a performance issue with monitoring of NetApp Ontap Qtree.
On a large system the NetApp Ontap special agent takes more than 8 minutes to execute. Almost all of these 8 minutes are taken for collecting data for service Qtree (disabling fetch of Qtree Quotas brings it down below a minute).
The plugin can be improved by adding a filter directly in the API call.
Bug reports
NetApp Release 9.12.1P18
Checkmk 2.4.0p16
Proposed changes
The function
fetch_qtree_quota()NetApp Ontap special agent is querying API endpoint/api/storage/quota/reportsfor the whole system without filtering. And then it excludes from the collected data all reports where type is not "tree":It is much more efficient to filter for
type=treedirectly in the API call, so that it returns only desired records.Doing that, the special agent execution on the same large NetApp system goes down from 8 minutes to 16 seconds.
On a smaller NetApp system, special agent execution time goes down from 50 seconds to 16 seconds.
References
According to ONTAP REST API reference, this filtering is available on all versions:
https://docs.netapp.com/us-en/ontap-restapi-9121/get-storage-quota-reports.html#related-ontap-commands