harvest
harvest copied to clipboard
Add filter support for RestPerf Collector
RestPerf Endpoint Filtering
Below are three methods for applying filters to RestPerf endpoints.
Use Case: filtering volumes by their names.
Approach 1: Cross-Field Query
Endpoint:
api/cluster/counter/tables/volume/rows?fields=*&query=test_vol&query_fields=properties.value
Limitations:
- Potential for false positives if other properties share the same value.
Approach 2: ID Regex Search
Endpoint:
api/cluster/counter/tables/volume/rows?fields=*&id=*test_vol*
Limitations:
- The ID for a volume is composed of the node, svm, volume, and uuid, formatted as
node:svm:volume:uuid
. This means the scope of this filtering is limited to the node, svm, and volume only. - Similar to the first method, if any of the node, svm, or volume has a match with the regular expression, it may result in false positives.
Approach 3: Property Value Search
This method involves searching for a specific property value.
Endpoint:
api/cluster/counter/tables/volume/rows?fields=*&properties.value=osc_vol01
Limitations:
- Only properties with the specified value are returned in the response. Other properties are omitted from the results, although counters are available.
- As with the previous methods, this approach may also result in false positives.
Irrespective of the approach, code changes in collector will be same. Approach 1 and 2 looks good to me.