Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support aggr filter for flexgroup volumes #1691

Merged
merged 4 commits into from
Feb 7, 2023
Merged

Conversation

Hardikl
Copy link
Contributor

@Hardikl Hardikl commented Feb 6, 2023

UI panels:
image

This panel has 2 info to be shown, second info is from ontap.
image

new metric from zapiperf:
image

metric labels for flexgroup:
image

@cla-bot cla-bot bot added the cla-signed label Feb 6, 2023
@Hardikl Hardikl linked an issue Feb 6, 2023 that may be closed by this pull request
grafana/dashboards/cmode/aggregate.json Outdated Show resolved Hide resolved
grafana/dashboards/cmode/aggregate.json Outdated Show resolved Hide resolved
grafana/dashboards/cmode/aggregate.json Outdated Show resolved Hide resolved
@Hardikl Hardikl merged commit 193f10f into main Feb 7, 2023
@Hardikl Hardikl deleted the volume_aggr_filter branch February 7, 2023 13:00
}
// make sure the order of aggregate is same for each poll
sort.Strings(aggrs)
fg.SetLabel("aggr", strings.Join(aggrs, ","))
Copy link
Contributor

Choose a reason for hiding this comment

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

It is better not to change aggr label returned by perf template given volume_labels will have empty aggr for flexgroup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -31,28 +32,54 @@ func (me *Volume) Run(data *matrix.Matrix) ([]*matrix.Matrix, error) {
opsKeyPrefix := "temp_"
re := regexp.MustCompile(`^(.*)__(\d{4})$`)

metricName := "aggrs"
Copy link
Contributor

Choose a reason for hiding this comment

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

may be 'volume_aggr_labels' is better output. Also rather than adding metric to the template perf matrix, it is better to create a new matrix for these labels so that existing aggr labels are not modified for perf template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

cache := data.Clone(false, true, false)
cache.UUID += ".Volume"

me.Logger.Trace().Msgf("added metric: (%s) [%s] %v", metricName, metricName, metric)

flexgroupAggrsMap := make(map[string]map[string]bool)
Copy link
Contributor

Choose a reason for hiding this comment

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

can use the eisting custom DS set in harvest. It will save some of the checks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, made the change in other PR: #1695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ONTAP: Aggregate Dashboard - Show volumes per aggregate
3 participants