Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,33 @@ This expands into three metrics: `apiserverCPU`, `multusCPU`, and `ovnCPU`, each
4. Each expanded metric is a deep copy — mutations to one do not affect others
5. The `fan_out` key is removed after expansion

#### Example: Retrieve more summary statistics with less duplication

Say you want to collect more than a single stastic about a metric, like mean, but also min, max. You can use `fan_out` to do this compactly:

```
tests:
- name: payload-cluster-density-v2
metadata:
...
metrics:
- name: nodeMajorFaults-${ag}
metricName.keyword: nodeMajorFaults
metric_of_interest: value
agg:
agg_type: ${ag}
fan_out:
- ag: avg

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the key is agg or agg_type it can cause unexpected errors. Maybe we could validate the fan_out block for known keywords?

- ag: min
- ag: max
```

This will return data that looks like the following table output:
```
time uuid ocpVersion nodeMajorFaults-avg_avg nodeMajorFaults-min_min nodeMajorFaults-max_max

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplication is ugly, but required or else we only get the last result metric.

I have a plan for a fix, but haven't prepared the fix yet, since this is a simple workaround.

---- ---- ---------- ----------------------- ----------------------- -----------------------
```

### `group_by` — Dynamic Expansion

Use `group_by` when you don't know the values ahead of time and want Orion to discover them from OpenSearch. Orion queries for all distinct values of the specified field, scoped by the metric's other filters and the test's UUIDs, then creates one metric per discovered value.
Expand Down
Loading