Skip to content

Commit

Permalink
Merge branch 'main' into hl_data_dash
Browse files Browse the repository at this point in the history
  • Loading branch information
Hardikl authored Dec 18, 2024
2 parents 89fedad + f3792fc commit 51d1729
Show file tree
Hide file tree
Showing 23 changed files with 504 additions and 134 deletions.
18 changes: 18 additions & 0 deletions cmd/tools/grafana/dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,24 @@ func checkVariablesAreFSxFriendly(t *testing.T, path string, data []byte) {
})
}

func TestLabelsNullVariables(t *testing.T) {
VisitDashboards(cDotDashboards,
func(path string, data []byte) {
checkVariablesLabelNull(t, path, data)
})
}

func checkVariablesLabelNull(t *testing.T, path string, data []byte) {
gjson.GetBytes(data, "templating.list").ForEach(func(key, value gjson.Result) bool {
if value.Get("label").Type != gjson.Null && value.Get("label").ClonedString() == "" {
varName := value.Get("name").ClonedString()
t.Errorf("dashboard=%s path=templating.list[%s]. variable=%s label should not be empty",
ShortPath(path), key.ClonedString(), varName)
}
return true
})
}

var linkPath = regexp.MustCompile(`/d/(.*?)/`)
var supportedLinkedObjects = []string{"cluster", "datacenter", "aggr", "svm", "volume", "node", "qtree", "home_node", "tenant"}
var exceptionPathPanelObject = []string{
Expand Down
39 changes: 39 additions & 0 deletions conf/keyperf/9.15.0/lun.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lun
query: api/storage/luns
object: lun

counters:
- ^^uuid => uuid
- ^location.volume.name => volume
- ^name => path
- ^statistics.status => status
- ^svm.name => svm
- statistics.iops_raw.other => other_ops
- statistics.iops_raw.read => read_ops
- statistics.iops_raw.total => total_ops
- statistics.iops_raw.write => write_ops
- statistics.latency_raw.other => other_latency
- statistics.latency_raw.read => avg_read_latency
- statistics.latency_raw.total => total_latency
- statistics.latency_raw.write => avg_write_latency
- statistics.throughput_raw.other => other_data
- statistics.throughput_raw.read => read_data
- statistics.throughput_raw.total => total_data
- statistics.throughput_raw.write => write_data
- statistics.timestamp(timestamp) => timestamp
- hidden_fields:
- statistics
- filter:
- statistics.timestamp=!"-"

plugins:
LabelAgent:
split_regex:
- path `^/[^/]+/([^/]+)(?:/.*?|)/([^/]+)$` volume,lun
- path `^([^/]+)$` lun

export_options:
instance_keys:
- lun
- svm
- volume
37 changes: 37 additions & 0 deletions conf/keyperf/9.15.0/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Namespace
query: api/storage/namespaces
object: namespace

counters:
- ^^uuid => uuid
- ^name => path
- ^statistics.status => status
- ^svm.name => svm
- statistics.iops_raw.other => other_ops
- statistics.iops_raw.read => read_ops
- statistics.iops_raw.total => total_ops
- statistics.iops_raw.write => write_ops
- statistics.latency_raw.other => avg_other_latency
- statistics.latency_raw.read => avg_read_latency
- statistics.latency_raw.total => avg_total_latency
- statistics.latency_raw.write => avg_write_latency
- statistics.throughput_raw.read => read_data
- statistics.throughput_raw.total => total_data
- statistics.throughput_raw.write => write_data
- statistics.timestamp(timestamp) => timestamp
- hidden_fields:
- statistics
- filter:
- statistics.timestamp=!"-"

plugins:
LabelAgent:
split:
- path `/` ,,volume,namespace

export_options:
instance_keys:
- namespace
- path
- svm
- volume
2 changes: 2 additions & 0 deletions conf/keyperf/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ objects:
Cluster: cluster.yaml
FlexCache: flexcache.yaml
LIF: lif.yaml
Lun: lun.yaml
Namespace: namespace.yaml
NFSv3: nfsv3.yaml
NFSv41: nfsv4_1.yaml
NFSv4: nfsv4.yaml
Expand Down
4 changes: 2 additions & 2 deletions conf/rest/9.12.0/snapshotpolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: SnapshotPolicy
query: api/storage/snapshot-policies
query: api/private/cli/volume/snapshot/policy
object: snapshot_policy

counters:
Expand All @@ -14,7 +14,7 @@ counters:

plugins:
- SnapshotPolicy

export_options:
instance_keys:
- snapshot_policy
Expand Down
3 changes: 3 additions & 0 deletions docs/configure-harvest-basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ At runtime, Harvest will invoke the script specified in the `credentials_script`
The script should communicate the credentials to Harvest by writing the response to its standard output (stdout).
Harvest supports two output formats from the script: YAML and plain text.

When running Harvest inside a container, tools like `jq` and `curl` are not available.
In such cases, you can use a Go binary as a credential script to fetch authentication information. For details on using a Go binary as a credential script for Harvest container deployment, please refer to the [GitHub discussion](https://github.com/NetApp/harvest/discussions/3380).

### YAML format

If the script outputs a YAML object with `username` and `password` keys, Harvest will use both the `username` and `password` from the output. For example, if the script writes the following, Harvest will use `myuser` and `mypassword` for the poller's credentials.
Expand Down
Loading

0 comments on commit 51d1729

Please sign in to comment.