harvest icon indicating copy to clipboard operation
harvest copied to clipboard

Add filter support for RestPerf Collector

Open rahulguptajss opened this issue 1 year ago • 1 comments

rahulguptajss avatar Dec 06 '23 08:12 rahulguptajss

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:

  1. 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:

  1. 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.
  2. 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:

  1. Only properties with the specified value are returned in the response. Other properties are omitted from the results, although counters are available.
  2. 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.

rahulguptajss avatar Dec 14 '23 12:12 rahulguptajss