Skip to content

Commit

Permalink
feat: adding panels for OntapS3SVM object (#3134)
Browse files Browse the repository at this point in the history
* feat: adding new dashboard for OntapS3SVM object
  • Loading branch information
Hardikl authored Sep 10, 2024
1 parent 6f025bd commit 74b259d
Show file tree
Hide file tree
Showing 12 changed files with 777 additions and 23 deletions.
2 changes: 1 addition & 1 deletion cmd/collectors/ems/ems.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ func (e *Ems) PollInstance() (map[string]*matrix.Matrix, error) {
// update metadata for collector logs
_ = e.Metadata.LazySetValueInt64("api_time", "instance", apiD.Microseconds())
_ = e.Metadata.LazySetValueInt64("parse_time", "instance", time.Since(parseT).Microseconds())
_ = e.Metadata.LazySetValueUint64("instances", "instance", uint64(bookendCacheSize))
_ = e.Metadata.LazySetValueUint64("instances", "instance", uint64(bookendCacheSize)) //nolint:gosec

return nil, nil
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/collectors/keyperf/keyperf.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ func (kp *KeyPerf) pollData(
calcD := time.Since(calcStart)
_ = kp.Metadata.LazySetValueUint64("instances", "data", uint64(len(curMat.GetInstances())))
_ = kp.Metadata.LazySetValueInt64("calc_time", "data", calcD.Microseconds())
_ = kp.Metadata.LazySetValueUint64("skips", "data", uint64(totalSkips))
_ = kp.Metadata.LazySetValueUint64("skips", "data", uint64(totalSkips)) //nolint:gosec

// store cache for next poll
kp.Matrix[kp.Object] = cachedData
Expand Down
1 change: 1 addition & 0 deletions cmd/collectors/rest/plugins/health/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ func (h *Health) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, *util
Int("numResolutionInstanceCount", resolutionInstancesCount).
Msg("Collected")

//nolint:gosec
h.client.Metadata.PluginInstances = uint64(diskAlertCount + shelfAlertCount + supportAlertCount + nodeAlertCount + HAAlertCount + networkEthernetPortAlertCount + networkFcpPortAlertCount +
networkInterfaceAlertCount + volumeRansomwareAlertCount + volumeMoveAlertCount + licenseAlertCount + resolutionInstancesCount)

Expand Down
2 changes: 1 addition & 1 deletion cmd/collectors/restperf/restperf.go
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ func (r *RestPerf) pollData(startTime time.Time, perfRecords []rest.PerfRecord)
calcD := time.Since(calcStart)
_ = r.Metadata.LazySetValueUint64("instances", "data", uint64(len(curMat.GetInstances())))
_ = r.Metadata.LazySetValueInt64("calc_time", "data", calcD.Microseconds())
_ = r.Metadata.LazySetValueUint64("skips", "data", uint64(totalSkips))
_ = r.Metadata.LazySetValueUint64("skips", "data", uint64(totalSkips)) //nolint:gosec

// store cache for next poll
r.Matrix[r.Object] = cachedData
Expand Down
2 changes: 1 addition & 1 deletion cmd/collectors/zapi/plugins/qtree/qtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (q *Qtree) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, *util.
}
}

q.client.Metadata.PluginInstances = uint64(quotaIndex)
q.client.Metadata.PluginInstances = uint64(quotaIndex) //nolint:gosec

q.Logger.Info().
Int("numQuotas", quotaIndex).
Expand Down
2 changes: 1 addition & 1 deletion cmd/collectors/zapiperf/zapiperf.go
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ func (z *ZapiPerf) PollData() (map[string]*matrix.Matrix, error) {
calcD := time.Since(calcStart)

_ = z.Metadata.LazySetValueInt64("calc_time", "data", calcD.Microseconds())
_ = z.Metadata.LazySetValueUint64("skips", "data", uint64(totalSkips))
_ = z.Metadata.LazySetValueUint64("skips", "data", uint64(totalSkips)) //nolint:gosec

// store cache for next poll
z.Matrix[z.Object] = cachedData
Expand Down
2 changes: 1 addition & 1 deletion cmd/tools/grafana/grafana_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func TestAddPrefixToMetricNames(t *testing.T) {
}
newExpressions = readExprs(updatedData)

for i := range len(newExpressions) {
for i := range newExpressions {
if newExpressions[i] != prefix+oldExpressions[i] {
t.Errorf("path: %s \nExpected: [%s]\n Got: [%s]", path, prefix+oldExpressions[i], newExpressions[i])
}
Expand Down
14 changes: 10 additions & 4 deletions conf/restperf/9.14.1/ontap_s3_svm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ counters:
- upload_part_rate
- upload_part_total

export_options:
instance_keys:
- node
- svm
plugins:
- Aggregator:
# plugin will create summary/average for each ontaps3_svm object
# any names after the object names will be treated as
# label names that will be added to instances
- svm<>ontaps3_svm

# only export svm aggregations from plugin
# set this true or comment, to get data for each ontaps3_svm
export_data: false
14 changes: 10 additions & 4 deletions conf/zapiperf/cdot/9.8.0/ontap_s3_svm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,13 @@ counters:
- upload_part_total
- vserver_name => svm

export_options:
instance_keys:
- node
- svm
plugins:
- Aggregator:
# plugin will create summary/average for each ontaps3_svm object
# any names after the object names will be treated as
# label names that will be added to instances
- svm<>ontaps3_svm

# only export svm aggregations from plugin
# set this true or comment, to get data for each ontaps3_svm
export_data: false
Loading

0 comments on commit 74b259d

Please sign in to comment.