diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6d4afdd49..999df8661 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,7 +1,7 @@ name: Build, Test, Lint License env: - GO_VERSION: "1.20.6" + GO_VERSION: "1.20.7" on: push: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 6c8ae2a8c..e1079e065 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.20.6' + go-version: '1.20.7' - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/Makefile b/Makefile index db63918c6..6dc30d128 100644 --- a/Makefile +++ b/Makefile @@ -180,9 +180,10 @@ ifeq ($(origin ci),undefined) @echo make ci=/path/to/harvest.yml ci-local @exit 1 endif - -@docker stop $$(docker ps -aq) && docker rm $$(docker ps -aq) - -@docker volume rm harvest_grafana_data harvest_prometheus_data - @cp $(ci) harvest.yml + -@docker stop $$(docker ps -aq) 2>/dev/null || true + -@docker rm $$(docker ps -aq) 2>/dev/null || true + -@docker volume rm harvest_grafana_data harvest_prometheus_data 2>/dev/null || true + @if [ "$(ci)" != "harvest.yml" ]; then cp $(ci) harvest.yml; else echo "Source and destination files are the same, skipping copy"; fi @./bin/harvest generate docker full --port --output harvest-compose.yml @docker build -f container/onePollerPerContainer/Dockerfile -t ghcr.io/netapp/harvest:latest . --no-cache --build-arg VERSION=${VERSION} @docker-compose -f prom-stack.yml -f harvest-compose.yml up -d --remove-orphans diff --git a/cmd/collectors/rest/plugins/sensor/sensor.go b/cmd/collectors/rest/plugins/sensor/sensor.go index 695aa74ba..f78085eaa 100644 --- a/cmd/collectors/rest/plugins/sensor/sensor.go +++ b/cmd/collectors/rest/plugins/sensor/sensor.go @@ -43,7 +43,7 @@ func New(p *plugin.AbstractPlugin) plugin.Plugin { return &Sensor{AbstractPlugin: p} } -var ambientRegex = regexp.MustCompile(`^(Ambient Temp|Ambient Temp \d|PSU\d AmbTemp|PSU\d Inlet|PSU\d Inlet Temp|In Flow Temp|Front Temp|System Inlet|Bat Ambient \d|Riser Inlet Temp)$`) +var ambientRegex = regexp.MustCompile(`^(Ambient Temp|Ambient Temp \d|PSU\d AmbTemp|PSU\d Inlet|PSU\d Inlet Temp|In Flow Temp|Front Temp|Bat_Ambient \d|Riser Inlet Temp)$`) var powerInRegex = regexp.MustCompile(`^PSU\d (InPwr Monitor|InPower|PIN|Power In)$`) var voltageRegex = regexp.MustCompile(`^PSU\d (\d+V|InVoltage|VIN|AC In Volt)$`) var currentRegex = regexp.MustCompile(`^PSU\d (\d+V Curr|Curr|InCurrent|Curr IIN|AC In Curr)$`) diff --git a/cmd/collectors/rest/plugins/volume/volume.go b/cmd/collectors/rest/plugins/volume/volume.go index 3ac3da398..e03c68b1b 100644 --- a/cmd/collectors/rest/plugins/volume/volume.go +++ b/cmd/collectors/rest/plugins/volume/volume.go @@ -11,17 +11,21 @@ import ( "github.com/netapp/harvest/v2/pkg/conf" "github.com/netapp/harvest/v2/pkg/errs" "github.com/netapp/harvest/v2/pkg/matrix" + "github.com/netapp/harvest/v2/pkg/tree/node" "github.com/tidwall/gjson" "strconv" "strings" "time" ) +const HoursInMonth = 24 * 30 + type Volume struct { *plugin.AbstractPlugin currentVal int client *rest.Client aggrsMap map[string]string // aggregate-uuid -> aggregate-name map + arw *matrix.Matrix } func New(p *plugin.AbstractPlugin) plugin.Plugin { @@ -55,6 +59,16 @@ func (my *Volume) Init() error { return err } + my.arw = matrix.New(my.Parent+".Volume", "volume_arw", "volume_arw") + exportOptions := node.NewS("export_options") + instanceKeys := exportOptions.NewChildS("instance_keys", "") + instanceKeys.NewChildS("", "ArwStatus") + my.arw.SetExportOptions(exportOptions) + _, err = my.arw.NewMetricFloat64("status", "status") + if err != nil { + my.Logger.Error().Stack().Err(err).Msg("add metric") + return err + } return nil } @@ -79,8 +93,11 @@ func (my *Volume) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, erro // update volume instance labels my.updateVolumeLabels(data) + // parse anti_ransomware_start_time, antiRansomwareState for all volumes and export at cluster level + my.handleARWProtection(data) + my.currentVal++ - return nil, nil + return []*matrix.Matrix{my.arw}, nil } func (my *Volume) updateVolumeLabels(data *matrix.Matrix) { @@ -96,6 +113,75 @@ func (my *Volume) updateVolumeLabels(data *matrix.Matrix) { } } +func (my *Volume) handleARWProtection(data *matrix.Matrix) { + var ( + arwInstance *matrix.Instance + arwStartTimeValue time.Time + err error + ) + + // Purge and reset data + my.arw.PurgeInstances() + my.arw.Reset() + + // Set all global labels + my.arw.SetGlobalLabels(data.GetGlobalLabels()) + arwStatusValue := "Active Mode" + // Case where cluster don't have any volumes, arwStatus show as 'Not Monitoring' + if len(data.GetInstances()) == 0 { + arwStatusValue = "Not Monitoring" + } + + // This is how cluster level arwStatusValue has been calculated based on each volume + // If any one volume arwStatus is disabled --> "Not Monitoring" + // If any one volume has been completed learning mode --> "Switch to Active Mode" + // If all volumes are in learning mode --> "Learning Mode" + // Else indicates arwStatus for all volumes are enabled --> "Active Mode" + for _, volume := range data.GetInstances() { + if arwState := volume.GetLabel("antiRansomwareState"); arwState == "" { + // Case where REST call don't return `antiRansomwareState` field, arwStatus show as 'Not Monitoring' + arwStatusValue = "Not Monitoring" + break + } else { + if arwState == "disabled" { + arwStatusValue = "Not Monitoring" + break + } else if arwState == "dry_run" || arwState == "enable_paused" { + arwStartTime := volume.GetLabel("anti_ransomware_start_time") + if arwStartTime == "" || arwStatusValue == "Switch to Active Mode" { + continue + } + // If ARW startTime is more than 30 days old, which indicates that learning mode has been finished. + if arwStartTimeValue, err = time.Parse(time.RFC3339, arwStartTime); err != nil { + my.Logger.Error().Err(err).Msg("Failed to parse arw start time") + arwStartTimeValue = time.Now() + } + if time.Since(arwStartTimeValue).Hours() > HoursInMonth { + arwStatusValue = "Switch to Active Mode" + } else { + arwStatusValue = "Learning Mode" + } + } + } + } + + arwInstanceKey := data.GetGlobalLabels().Get("cluster") + data.GetGlobalLabels().Get("datacenter") + if arwInstance, err = my.arw.NewInstance(arwInstanceKey); err != nil { + my.Logger.Error().Err(err).Str("arwInstanceKey", arwInstanceKey).Msg("Failed to create arw instance") + return + } + + arwInstance.SetLabel("ArwStatus", arwStatusValue) + m := my.arw.GetMetric("status") + // populate numeric data + value := 1.0 + if err = m.SetValueFloat64(arwInstance, value); err != nil { + my.Logger.Error().Stack().Err(err).Float64("value", value).Msg("Failed to parse value") + } else { + my.Logger.Debug().Float64("value", value).Msg("added value") + } +} + func (my *Volume) getEncryptedDisks() ([]gjson.Result, error) { var ( result []gjson.Result diff --git a/cmd/collectors/zapi/plugins/aggregate/aggregate.go b/cmd/collectors/zapi/plugins/aggregate/aggregate.go index 5f9deaff5..e1b07b408 100644 --- a/cmd/collectors/zapi/plugins/aggregate/aggregate.go +++ b/cmd/collectors/zapi/plugins/aggregate/aggregate.go @@ -2,6 +2,7 @@ package aggregate import ( "errors" + goversion "github.com/hashicorp/go-version" "github.com/netapp/harvest/v2/cmd/collectors" "github.com/netapp/harvest/v2/cmd/poller/plugin" "github.com/netapp/harvest/v2/pkg/api/ontapi/zapi" @@ -9,6 +10,7 @@ import ( "github.com/netapp/harvest/v2/pkg/errs" "github.com/netapp/harvest/v2/pkg/matrix" "github.com/netapp/harvest/v2/pkg/tree/node" + "strconv" "strings" ) @@ -73,6 +75,29 @@ func (a *Aggregate) getCloudStores() error { err error ) + // aggr-object-store-get-iter Zapi was introduced in 9.2. + version := a.client.Version() + clusterVersion := strconv.Itoa(version[0]) + "." + strconv.Itoa(version[1]) + "." + strconv.Itoa(version[2]) + ontapVersion, err := goversion.NewVersion(clusterVersion) + if err != nil { + a.Logger.Error().Err(err). + Str("version", clusterVersion). + Msg("Failed to parse version") + return err + } + version92 := "9.2" + version92After, err := goversion.NewVersion(version92) + if err != nil { + a.Logger.Error().Err(err). + Str("version", version92). + Msg("Failed to parse version") + return err + } + + if ontapVersion.LessThan(version92After) { + return nil + } + a.aggrCloudStoresMap = make(map[string][]string) request := node.NewXMLS("aggr-object-store-get-iter") request.NewChildS("max-records", collectors.DefaultBatchSize) diff --git a/cmd/collectors/zapi/plugins/sensor/sensor.go b/cmd/collectors/zapi/plugins/sensor/sensor.go index 051642b8a..e715d8487 100644 --- a/cmd/collectors/zapi/plugins/sensor/sensor.go +++ b/cmd/collectors/zapi/plugins/sensor/sensor.go @@ -43,7 +43,7 @@ func New(p *plugin.AbstractPlugin) plugin.Plugin { return &Sensor{AbstractPlugin: p} } -var ambientRegex = regexp.MustCompile(`^(Ambient Temp|Ambient Temp \d|PSU\d AmbTemp|PSU\d Inlet|PSU\d Inlet Temp|In Flow Temp|Front Temp|System Inlet|Bat Ambient \d|Riser Inlet Temp)$`) +var ambientRegex = regexp.MustCompile(`^(Ambient Temp|Ambient Temp \d|PSU\d AmbTemp|PSU\d Inlet|PSU\d Inlet Temp|In Flow Temp|Front Temp|Bat_Ambient \d|Riser Inlet Temp)$`) var powerInRegex = regexp.MustCompile(`^PSU\d (InPwr Monitor|InPower|PIN|Power In)$`) var voltageRegex = regexp.MustCompile(`^PSU\d (\d+V|InVoltage|VIN|AC In Volt)$`) var currentRegex = regexp.MustCompile(`^PSU\d (\d+V Curr|Curr|InCurrent|Curr IIN|AC In Curr)$`) diff --git a/cmd/collectors/zapi/plugins/sensor/sensor_test.go b/cmd/collectors/zapi/plugins/sensor/sensor_test.go index bf3f0c327..a4f7a3029 100644 --- a/cmd/collectors/zapi/plugins/sensor/sensor_test.go +++ b/cmd/collectors/zapi/plugins/sensor/sensor_test.go @@ -89,28 +89,29 @@ func init() { // Verified temperature sensor values by parsing, pivoting, etc. externally via dasel, jq, miller // average_ambient_temperature is -// cat cmd/collectors/zapi/plugins/sensor/testdata/sensor.xml | dasel -r xml -w json | jq -r '.root."attributes-list"."environment-sensors-info"[] | select(."sensor-type" | test("thermal")) | {node: (."node-name"), name: (."sensor-name"), value: (."threshold-sensor-value")} | [.node, .name, .value] | @csv' | rg "Ambient Temp|Ambient Temp \d|PSU\d AmbTemp|PSU\d Inlet|PSU\d Inlet Temp|In Flow Temp|Front Temp|System Inlet|Bat Ambient \d|Riser Inlet Temp" | rg -v "Fake" | mlr --csv --implicit-csv-header label node,name,value then stats1 -a min,mean,max -f value -g node | mlr --csv --opprint --barred cat - -// +------------+-----------+--------------------+-----------+ -// | node | value_min | value_mean | value_max | -// +------------+-----------+--------------------+-----------+ -// | cdot-k3-05 | 21 | 21.666666666666668 | 23 | -// | cdot-k3-06 | 21 | 22 | 24 | -// | cdot-k3-07 | 21 | 21.666666666666668 | 23 | -// | cdot-k3-08 | 21 | 22.333333333333332 | 24 | -// +------------+-----------+--------------------+-----------+ +// cat cmd/collectors/zapi/plugins/sensor/testdata/sensor.xml | dasel -r xml -w json | jq -r '.root."attributes-list"."environment-sensors-info"[] | select(."sensor-type" | test("thermal")) | {node: (."node-name"), name: (."sensor-name"), value: (."threshold-sensor-value")} | [.node, .name, .value] | @csv' | rg "Ambient Temp|Ambient Temp \d|PSU\d AmbTemp|PSU\d Inlet|PSU\d Inlet Temp|In Flow Temp|Front Temp|Bat Ambient \d|Riser Inlet Temp" | rg -v "Fake" | mlr --csv --implicit-csv-header label node,name,value then stats1 -a min,mean,max -f value -g node | mlr --csv --opprint --barred cat + +//+------------+-----------+------------+-----------+ +//| node | value_min | value_mean | value_max | +//+------------+-----------+------------+-----------+ +//| cdot-k3-05 | 21 | 22 | 23 | +//| cdot-k3-06 | 21 | 22.5 | 24 | +//| cdot-k3-07 | 21 | 22 | 23 | +//| cdot-k3-08 | 21 | 22.5 | 24 | +//+------------+-----------+------------+-----------+ + // // average_temperature [min, avg, max] is calculated like so -// cat cmd/collectors/zapi/plugins/sensor/testdata/sensor.xml | dasel -r xml -w json | jq -r '.root."attributes-list"."environment-sensors-info"[] | select(."sensor-type" | test("thermal")) | {node: (."node-name"), name: (."sensor-name"), value: (."threshold-sensor-value")} | [.node, .name, .value] | @csv' | rg -v "Ambient Temp|Ambient Temp \d|PSU\d AmbTemp|PSU\d Inlet|PSU\d Inlet Temp|In Flow Temp|Front Temp|System Inlet|Bat Ambient \d|Riser Inlet Temp" | rg -v "Fake" | mlr --csv --implicit-csv-header label node,name,value then stats1 -a min,mean,max -f value -g node | mlr --csv --opprint --barred cat +// cat cmd/collectors/zapi/plugins/sensor/testdata/sensor.xml | dasel -r xml -w json | jq -r '.root."attributes-list"."environment-sensors-info"[] | select(."sensor-type" | test("thermal")) | {node: (."node-name"), name: (."sensor-name"), value: (."threshold-sensor-value")} | [.node, .name, .value] | @csv' | rg -v "Ambient Temp|Ambient Temp \d|PSU\d AmbTemp|PSU\d Inlet|PSU\d Inlet Temp|In Flow Temp|Front Temp|Bat Ambient \d|Riser Inlet Temp" | rg -v "Fake" | mlr --csv --implicit-csv-header label node,name,value then stats1 -a min,mean,max -f value -g node | mlr --csv --opprint --barred cat -// +------------+-----------+------------+-----------+ -// | node | value_min | value_mean | value_max | -// +------------+-----------+------------+-----------+ -// | cdot-k3-05 | 19 | 27.1875 | 36 | -// | cdot-k3-06 | 19 | 26.6875 | 35 | -// | cdot-k3-07 | 19 | 26.6875 | 35 | -// | cdot-k3-08 | 20 | 27.5 | 36 | -// +------------+-----------+------------+-----------+ +//+------------+-----------+--------------------+-----------+ +//| node | value_min | value_mean | value_max | +//+------------+-----------+--------------------+-----------+ +//| cdot-k3-05 | 19 | 26.823529411764707 | 36 | +//| cdot-k3-06 | 19 | 26.352941176470587 | 35 | +//| cdot-k3-07 | 19 | 26.352941176470587 | 35 | +//| cdot-k3-08 | 20 | 27.176470588235293 | 36 | +//+------------+-----------+--------------------+-----------+ func TestSensor_Run(t *testing.T) { @@ -120,12 +121,12 @@ func TestSensor_Run(t *testing.T) { omat, _ := sensor.Run(dataMap) expected := map[string]map[string]float64{ - "average_ambient_temperature": {"cdot-k3-05": 21.666666666666668, "cdot-k3-06": 22, "cdot-k3-07": 21.666666666666668, "cdot-k3-08": 22.333333333333332}, + "average_ambient_temperature": {"cdot-k3-05": 22, "cdot-k3-06": 22.5, "cdot-k3-07": 22, "cdot-k3-08": 22.5}, "average_fan_speed": {"cdot-k3-05": 7030, "cdot-k3-06": 7050, "cdot-k3-07": 7040, "cdot-k3-08": 7050}, "max_fan_speed": {"cdot-k3-05": 7700, "cdot-k3-06": 7700, "cdot-k3-07": 7700, "cdot-k3-08": 7700}, "min_fan_speed": {"cdot-k3-05": 4600, "cdot-k3-06": 4500, "cdot-k3-07": 4600, "cdot-k3-08": 4500}, "power": {"cdot-k3-05": 383.4, "cdot-k3-06": 347.9, "cdot-k3-07": 340.8, "cdot-k3-08": 362.1}, - "average_temperature": {"cdot-k3-05": 27.1875, "cdot-k3-06": 26.6875, "cdot-k3-07": 26.6875, "cdot-k3-08": 27.5}, + "average_temperature": {"cdot-k3-05": 26.823529411764707, "cdot-k3-06": 26.352941176470587, "cdot-k3-07": 26.352941176470587, "cdot-k3-08": 27.176470588235293}, "max_temperature": {"cdot-k3-05": 36, "cdot-k3-06": 35, "cdot-k3-07": 35, "cdot-k3-08": 36}, "min_ambient_temperature": {"cdot-k3-05": 21, "cdot-k3-06": 21, "cdot-k3-07": 21, "cdot-k3-08": 21}, "min_temperature": {"cdot-k3-05": 19, "cdot-k3-06": 19, "cdot-k3-07": 19, "cdot-k3-08": 20}, diff --git a/cmd/collectors/zapi/plugins/shelf/shelf.go b/cmd/collectors/zapi/plugins/shelf/shelf.go index 82d0ba319..5cb527f46 100644 --- a/cmd/collectors/zapi/plugins/shelf/shelf.go +++ b/cmd/collectors/zapi/plugins/shelf/shelf.go @@ -17,12 +17,21 @@ const BatchSize = "500" type Shelf struct { *plugin.AbstractPlugin - data map[string]*matrix.Matrix - instanceKeys map[string]string - instanceLabels map[string]*dict.Dict - batchSize string - client *zapi.Client - query string + data map[string]*matrix.Matrix + shelfData *matrix.Matrix + instanceKeys map[string]string + instanceLabels map[string]*dict.Dict + shelfInstanceKeys []string + shelfInstanceLabels []shelfInstanceLabel + batchSize string + client *zapi.Client + query string +} + +type shelfInstanceLabel struct { + label string + labelDisplay string + parent string } func New(p *plugin.AbstractPlugin) plugin.Plugin { @@ -38,7 +47,7 @@ func (my *Shelf) Init() error { } if my.client, err = zapi.New(conf.ZapiPoller(my.ParentParams), my.Auth); err != nil { - my.Logger.Error().Stack().Err(err).Msg("connecting") + my.Logger.Error().Err(err).Msg("connecting") return err } @@ -50,6 +59,8 @@ func (my *Shelf) Init() error { my.Logger.Debug().Msg("plugin connected!") + my.create7ModeShelfMetrics() + my.data = make(map[string]*matrix.Matrix) my.instanceKeys = make(map[string]string) my.instanceLabels = make(map[string]*dict.Dict) @@ -102,7 +113,7 @@ func (my *Shelf) Init() error { case "float": _, err := my.data[attribute].NewMetricFloat64(metricName, display) if err != nil { - my.Logger.Error().Stack().Err(err).Msg("add metric") + my.Logger.Error().Err(err).Msg("add metric") return err } my.Logger.Debug().Msgf("added metric: (%s) (%s) [%s]", attribute, x.GetNameS(), display) @@ -110,12 +121,12 @@ func (my *Shelf) Init() error { } } - my.Logger.Debug().Msgf("added data for [%s] with %d metrics", attribute, len(my.data[attribute].GetMetrics())) + my.Logger.Debug().Str("attribute", attribute).Int("metrics count", len(my.data[attribute].GetMetrics())).Msg("added") my.data[attribute].SetExportOptions(exportOptions) } - my.Logger.Debug().Msgf("initialized with data [%d] objects", len(my.data)) + my.Logger.Debug().Int("objects count", len(my.data)).Msg("initialized") // setup batchSize for request my.batchSize = BatchSize @@ -154,16 +165,18 @@ func (my *Shelf) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, error return nil, err } - output, err = my.handle7Mode(result) + output, err = my.handle7Mode(data, result) if err != nil { return output, err } + my.Logger.Debug().Int("Shelves instance count", len(my.shelfData.GetInstances())).Send() + output = append(output, my.shelfData) return output, nil } -func (my *Shelf) handle7Mode(result []*node.Node) ([]*matrix.Matrix, error) { +func (my *Shelf) handle7Mode(data *matrix.Matrix, result []*node.Node) ([]*matrix.Matrix, error) { var ( shelves []*node.Node channels []*node.Node @@ -189,6 +202,15 @@ func (my *Shelf) handle7Mode(result []*node.Node) ([]*matrix.Matrix, error) { data1.Reset() } + // Purge and reset data + my.shelfData.PurgeInstances() + my.shelfData.Reset() + + my.shelfData.SetGlobalLabels(data.GetGlobalLabels()) + for _, instance := range data.GetInstances() { + instance.SetExportable(false) + } + for _, channel := range channels { channelName := channel.GetChildContentS("channel-name") shelves = channel.SearchChildren([]string{"shelf-environ-shelf-list", "shelf-environ-shelf-info"}) @@ -199,11 +221,43 @@ func (my *Shelf) handle7Mode(result []*node.Node) ([]*matrix.Matrix, error) { } for _, shelf := range shelves { - uid := shelf.GetChildContentS("shelf-id") shelfName := uid // no shelf name in 7mode shelfID := uid + shelfInstanceKey := shelfID + "." + channelName + newShelfInstance, err := my.shelfData.NewInstance(shelfInstanceKey) + if err != nil { + my.Logger.Error().Err(err).Msg("Error while creating shelf instance") + return nil, err + } + + for _, key := range my.shelfInstanceKeys { + newShelfInstance.SetLabel(key, shelf.GetChildContentS(key)) + } + for _, shelfLabelData := range my.shelfInstanceLabels { + if shelfLabelData.parent == "" { + newShelfInstance.SetLabel(shelfLabelData.labelDisplay, shelf.GetChildContentS(shelfLabelData.label)) + } else { + child := shelf.GetChildS(shelfLabelData.parent) + newShelfInstance.SetLabel(shelfLabelData.labelDisplay, child.GetChildContentS(shelfLabelData.label)) + } + } + + newShelfInstance.SetLabel("channel", channelName) + newShelfInstance.SetLabel("shelf", newShelfInstance.GetLabel("shelf_id")) + + // populate numeric data + for metricKey, m := range my.shelfData.GetMetrics() { + if value := strings.Split(shelf.GetChildContentS(metricKey), " ")[0]; value != "" { + if err := m.SetValueString(newShelfInstance, value); err != nil { + my.Logger.Debug().Str("metricKey", metricKey).Str("value", value).Err(err).Msg("failed to parse") + } else { + my.Logger.Debug().Str("metricKey", metricKey).Str("value", value).Msg("added") + } + } + } + for attribute, data1 := range my.data { if statusMetric := data1.GetMetric("status"); statusMetric != nil { @@ -252,7 +306,6 @@ func (my *Shelf) handle7Mode(result []*node.Node) ([]*matrix.Matrix, error) { // populate numeric data for metricKey, m := range data1.GetMetrics() { - if value := strings.Split(obj.GetChildContentS(metricKey), " ")[0]; value != "" { if err := m.SetValueString(instance, value); err != nil { my.Logger.Debug().Msgf("(%s) failed to parse value (%s): %v", metricKey, value, err) @@ -261,7 +314,6 @@ func (my *Shelf) handle7Mode(result []*node.Node) ([]*matrix.Matrix, error) { } } } - } else { my.Logger.Debug().Msgf("instance without [%s], skipping", my.instanceKeys[attribute]) } @@ -274,3 +326,53 @@ func (my *Shelf) handle7Mode(result []*node.Node) ([]*matrix.Matrix, error) { } return output, nil } + +func (my *Shelf) create7ModeShelfMetrics() { + my.shelfData = matrix.New(my.Parent+".Shelf", "shelf", "shelf") + my.shelfInstanceKeys = make([]string, 0) + my.shelfInstanceLabels = []shelfInstanceLabel{} + shelfExportOptions := node.NewS("export_options") + shelfInstanceKeys := shelfExportOptions.NewChildS("instance_keys", "") + shelfInstanceLabels := shelfExportOptions.NewChildS("instance_labels", "") + + if counters := my.ParentParams.GetChildS("counters"); counters != nil { + if channelInfo := counters.GetChildS("shelf-environ-channel-info"); channelInfo != nil { + if shelfList := channelInfo.GetChildS("shelf-environ-shelf-list"); shelfList != nil { + if shelfInfo := shelfList.GetChildS("shelf-environ-shelf-info"); shelfInfo != nil { + my.parse7ModeTemplate(shelfInfo, shelfInstanceKeys, shelfInstanceLabels, "") + } + } + } + } + + shelfInstanceKeys.NewChildS("", "channel") + shelfInstanceKeys.NewChildS("", "shelf") + my.shelfData.SetExportOptions(shelfExportOptions) +} + +func (my *Shelf) parse7ModeTemplate(shelfInfo *node.Node, shelfInstanceKeys, shelfInstanceLabels *node.Node, parent string) { + for _, shelfProp := range shelfInfo.GetChildren() { + if len(shelfProp.GetChildren()) > 0 { + my.parse7ModeTemplate(shelfInfo.GetChildS(shelfProp.GetNameS()), shelfInstanceKeys, shelfInstanceLabels, shelfProp.GetNameS()) + } else { + metricName, display, kind, _ := util.ParseMetric(shelfProp.GetContentS()) + switch kind { + case "key": + my.shelfInstanceKeys = append(my.shelfInstanceKeys, metricName) + my.shelfInstanceLabels = append(my.shelfInstanceLabels, shelfInstanceLabel{label: metricName, labelDisplay: display, parent: parent}) + shelfInstanceKeys.NewChildS("", display) + my.Logger.Debug().Str("instance key", display).Msg("added") + case "label": + my.shelfInstanceLabels = append(my.shelfInstanceLabels, shelfInstanceLabel{label: metricName, labelDisplay: display, parent: parent}) + shelfInstanceLabels.NewChildS("", display) + my.Logger.Debug().Str("instance label", display).Msg("added") + case "float": + _, err := my.shelfData.NewMetricFloat64(metricName, display) + if err != nil { + my.Logger.Error().Err(err).Msg("add metric") + } + my.Logger.Debug().Str("metric", display).Msg("added") + } + } + } +} diff --git a/cmd/collectors/zapi/plugins/snapmirror/snapmirror.go b/cmd/collectors/zapi/plugins/snapmirror/snapmirror.go index 36b37e2de..26f082d69 100644 --- a/cmd/collectors/zapi/plugins/snapmirror/snapmirror.go +++ b/cmd/collectors/zapi/plugins/snapmirror/snapmirror.go @@ -9,7 +9,6 @@ import ( "github.com/netapp/harvest/v2/cmd/poller/plugin" "github.com/netapp/harvest/v2/pkg/api/ontapi/zapi" "github.com/netapp/harvest/v2/pkg/conf" - "github.com/netapp/harvest/v2/pkg/dict" "github.com/netapp/harvest/v2/pkg/errs" "github.com/netapp/harvest/v2/pkg/matrix" "github.com/netapp/harvest/v2/pkg/tree/node" @@ -19,12 +18,9 @@ import ( type SnapMirror struct { *plugin.AbstractPlugin - client *zapi.Client - destLimitCache *dict.Dict - srcLimitCache *dict.Dict - nodeUpdCounter int - limitUpdCounter int - svmPeerDataMap map[string]Peer // [peer SVM alias name] -> [peer detail] map + client *zapi.Client + nodeUpdCounter int + svmPeerDataMap map[string]Peer // [peer SVM alias name] -> [peer detail] map } type Peer struct { @@ -50,9 +46,6 @@ func (my *SnapMirror) Init() error { return err } my.nodeUpdCounter = 0 - my.limitUpdCounter = 0 - my.destLimitCache = dict.New() - my.srcLimitCache = dict.New() my.svmPeerDataMap = make(map[string]Peer) my.Logger.Debug().Msg("plugin initialized") @@ -60,20 +53,8 @@ func (my *SnapMirror) Init() error { } func (my *SnapMirror) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, error) { data := dataMap[my.Object] - // update caches every so while - if my.limitUpdCounter == 0 { - if err := my.updateLimitCache(); err != nil { - return nil, err - } - my.Logger.Debug().Msg("updated limit cache") - } else if my.limitUpdCounter > 100 { - my.limitUpdCounter = 0 - } else { - my.limitUpdCounter++ - } destUpdCount := 0 srcUpdCount := 0 - limitUpdCount := 0 if cluster, ok := data.GetGlobalLabels().GetHas("cluster"); ok { if err := my.getSVMPeerData(cluster); err != nil { @@ -148,53 +129,11 @@ func (my *SnapMirror) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, } } } - // check if destination node limit is missing - if instance.GetLabel("destination_node_limit") == "" { - if limit, has := my.srcLimitCache.GetHas(instance.GetLabel("destination_node")); has { - instance.SetLabel("destination_node_limit", limit) - limitUpdCount++ - } - } - // check if destination node limit is missing - if instance.GetLabel("source_node_limit") == "" { - if limit, has := my.srcLimitCache.GetHas(instance.GetLabel("source_node")); has { - instance.SetLabel("source_node_limit", limit) - } - } } - my.Logger.Debug().Msgf("updated %d destination and %d source nodes, %d node limits", destUpdCount, srcUpdCount, limitUpdCount) + my.Logger.Debug().Msgf("updated %d destination and %d source nodes", destUpdCount, srcUpdCount) return nil, nil } -func (my *SnapMirror) updateLimitCache() error { - var ( - request, response *node.Node - err error - ) - request = node.NewXMLS("perf-object-get-instances") - request.NewChildS("objectname", "smc_em") - requestInstances := request.NewChildS("instances", "") - requestInstances.NewChildS("instance", "*") - requestCounters := request.NewChildS("counters", "") - requestCounters.NewChildS("counter", "node_name") - requestCounters.NewChildS("counter", "dest_meter_count") - requestCounters.NewChildS("counter", "src_meter_count") - if response, err = my.client.InvokeRequest(request); err != nil { - return err - } - count := 0 - if instances := response.GetChildS("instances"); instances != nil { - for _, i := range instances.GetChildren() { - nodeName := i.GetChildContentS("node_name") - my.destLimitCache.Set(nodeName, i.GetChildContentS("dest_meter_count")) - my.srcLimitCache.Set(nodeName, i.GetChildContentS("src_meter_count")) - count++ - } - } - my.Logger.Debug().Msgf("updated limit cache for %d nodes", count) - return nil -} - func (my *SnapMirror) getSVMPeerData(cluster string) error { var ( result []*node.Node diff --git a/conf/rest/9.10.0/volume.yaml b/conf/rest/9.10.0/volume.yaml new file mode 100644 index 000000000..31df04304 --- /dev/null +++ b/conf/rest/9.10.0/volume.yaml @@ -0,0 +1,147 @@ +# This api would provide all volumes(but node). + +name: Volume +query: api/storage/volumes +object: volume + +counters: + - ^^name => volume + - ^^svm.name => svm + - ^aggregates.#.name => aggr + - ^aggregates.#.uuid => aggrUuid # handled in plugin for flexgroup + - ^anti_ransomware.dry_run_start_time => anti_ransomware_start_time + - ^anti_ransomware.state => antiRansomwareState + - ^encryption.enabled => isEncrypted + - ^is_svm_root => svm_root + - ^snaplock.type => snaplock_type + - ^snapshot_policy.name => snapshot_policy + - ^space.snapshot.autodelete.enabled => snapshot_autodelete + - ^state => state + - ^style => style + - ^type => type + - autosize.grow_threshold => autosize_grow_threshold_percent + - autosize.maximum => autosize_maximum_size + - snapshot_count + - space.afs_total => size_total + - space.available => size_available + - space.expected_available => space_expected_available + - space.filesystem_size => filesystem_size + - space.logical_space.available => space_logical_available + - space.logical_space.used => space_logical_used + - space.logical_space.used_by_afs => space_logical_used_by_afs + - space.logical_space.used_by_snapshots => space_logical_used_by_snapshots + - space.logical_space.used_percent => space_logical_used_percent + - space.overwrite_reserve => overwrite_reserve_total + - space.overwrite_reserve_used => overwrite_reserve_used + - space.percent_used => size_used_percent + - space.physical_used => space_physical_used + - space.physical_used_percent => space_physical_used_percent + - space.size => size + - space.size_available_for_snapshots => snapshots_size_available + - space.snapshot.reserve_available => snapshot_reserve_available + - space.snapshot.reserve_percent => snapshot_reserve_percent + - space.snapshot.reserve_size => snapshot_reserve_size + - space.snapshot.space_used_percent => snapshot_reserve_used_percent + - space.snapshot.used => snapshots_size_used + - space.used => size_used + - hidden_fields: + - anti_ransomware.dry_run_start_time + - anti_ransomware.state + - autosize + - encryption.enabled + - is_svm_root + - snaplock.type + - space + +endpoints: + - query: api/private/cli/volume + counters: + - ^^volume + - ^^vserver => svm + - ^is_sis_volume => is_sis_volume + - ^nodes => node + - compression_space_saved => sis_compress_saved + - compression_space_saved_percent => sis_compress_saved_percent + - dedupe_space_saved => sis_dedup_saved + - dedupe_space_saved_percent => sis_dedup_saved_percent + - files => inode_files_total + - files_used => inode_files_used + - sis_space_saved => sis_total_saved + - sis_space_saved_percent => sis_total_saved_percent + + - query: api/storage/volumes + counters: + - ^^name => volume + - ^^svm.name => svm + - ^clone.parent_snapshot.name => clone_parent_snapshot + - ^clone.parent_svm.name => clone_parent_svm + - ^clone.parent_volume.name => clone_parent_volume + - clone.split_estimate => clone_split_estimate + - hidden_fields: + - clone + - filter: + - clone.is_flexclone=true + + - query: api/private/cli/volume/efficiency/stat + counters: + - ^^volume + - ^^vserver => svm + - num_compress_attempts + - num_compress_fail + - filter: + - privilege_level=diagnostic + +plugins: + - Volume: + schedule: + - data: 15m # should be multiple of poll duration + - MetricAgent: + compute_metric: + - inode_used_percent PERCENT inode_files_used inode_files_total + - snapshot_reserve_used SUBTRACT snapshot_reserve_size snapshot_reserve_available + - overwrite_reserve_available SUBTRACT overwrite_reserve_total overwrite_reserve_used + - LabelAgent: + exclude_equals: + - style `flexgroup_constituent` + value_to_num: + - new_status state online online `0` + replace: + - svm_root root_volume `false` `No` + - svm_root root_volume `true` `Yes` + # To prevent visibility of transient volumes, uncomment the following lines +# exclude_regex: +# # Exclude SnapProtect/CommVault Intellisnap, Clone volumes have a “_CVclone” suffix +# - volume `.+_CVclone` +# # Exclude SnapCenter, Clone volumes have a “DDMMYYhhmmss” suffix +# - volume `.+(0[1-9]|[12][0-9]|3[01])(0[1-9]|1[012])\d\d[0-9]{6}` +# # Exclude manually created SnapCreator clones, Clone volumes have a “cl_” prefix and a “_YYYYMMDDhhmmss” suffix +# - volume `cl_.+_(19|20)\d\d(0[1-9]|1[012])( 0[1-9]|[12][0-9]|3[01])[0-9]{6}` +# # Exclude SnapDrive/SnapManager, Clone volumes have a “sdw_cl_” prefix +# - volume `sdw_cl_.+` +# # Exclude Metadata volumes, CRS volumes in SVM-DR or MetroCluster have a “MDV_CRS_” prefix +# - volume `MDV_CRS_.+` +# # Exclude Metadata volumes, Audit volumes have a “MDV_aud_” prefix +# - volume `MDV_aud_.+` + +export_options: + instance_keys: + - aggr + - node + - style + - svm + - volume + instance_labels: + - antiRansomwareState + - clone_parent_snapshot + - clone_parent_svm + - clone_parent_volume + - isEncrypted + - isHardwareEncrypted + - is_sis_volume + - root_volume + - snaplock_type + - snapshot_autodelete + - snapshot_policy + - state + - svm_root + - type diff --git a/conf/rest/9.12.0/ems_destination.yaml b/conf/rest/9.12.0/ems_destination.yaml new file mode 100644 index 000000000..2935dc3e3 --- /dev/null +++ b/conf/rest/9.12.0/ems_destination.yaml @@ -0,0 +1,25 @@ + +name: EmsDestination +query: api/support/ems/destinations +object: ems_destination + +counters: + - ^^destination => destination + - ^^name => name + - ^^type => type + - ^certificate.ca => certificate + - ^filter => filter + - ^syslog => syslog + - ^system_defined => system_defined + - filter: + - system_defined=false + +export_options: + instance_keys: + - destination + - name + - type + instance_labels: + - certificate + - filter + - syslog diff --git a/conf/rest/9.12.0/support_auto_update.yaml b/conf/rest/9.12.0/support_auto_update.yaml new file mode 100644 index 000000000..df0e186c6 --- /dev/null +++ b/conf/rest/9.12.0/support_auto_update.yaml @@ -0,0 +1,13 @@ + +name: SupportAutoUpdate +query: api/support/auto-update +object: support_auto_update + +counters: + - ^enabled => auto_update_enabled + +export_options: + instance_keys: + - auto_update_enabled + instance_labels: + - auto_update_enabled diff --git a/conf/rest/9.12.0/volume.yaml b/conf/rest/9.9.0/volume.yaml similarity index 98% rename from conf/rest/9.12.0/volume.yaml rename to conf/rest/9.9.0/volume.yaml index 66ce60410..269d7bdb7 100644 --- a/conf/rest/9.12.0/volume.yaml +++ b/conf/rest/9.9.0/volume.yaml @@ -9,11 +9,11 @@ counters: - ^^svm.name => svm - ^aggregates.#.name => aggr - ^aggregates.#.uuid => aggrUuid # handled in plugin for flexgroup - - ^anti_ransomware.state => antiRansomwareState - ^encryption.enabled => isEncrypted - ^is_svm_root => svm_root - ^snaplock.type => snaplock_type - ^snapshot_policy.name => snapshot_policy + - ^space.snapshot.autodelete.enabled => snapshot_autodelete - ^state => state - ^style => style - ^type => type @@ -44,7 +44,6 @@ counters: - space.snapshot.used => snapshots_size_used - space.used => size_used - hidden_fields: - - anti_ransomware.state - autosize - encryption.enabled - is_svm_root @@ -130,7 +129,6 @@ export_options: - svm - volume instance_labels: - - antiRansomwareState - clone_parent_snapshot - clone_parent_svm - clone_parent_volume @@ -139,6 +137,7 @@ export_options: - is_sis_volume - root_volume - snaplock_type + - snapshot_autodelete - snapshot_policy - state - svm_root diff --git a/conf/rest/default.yaml b/conf/rest/default.yaml index b2e2763dc..74fef53f9 100644 --- a/conf/rest/default.yaml +++ b/conf/rest/default.yaml @@ -13,6 +13,7 @@ objects: CloudTarget: cloud_target.yaml ClusterPeer: clusterpeer.yaml Disk: disk.yaml + EmsDestination: ems_destination.yaml # ExportRule: exports.yaml LIF: lif.yaml Health: health.yaml @@ -42,6 +43,7 @@ objects: Status: status.yaml Subsystem: subsystem.yaml Support: support.yaml + SupportAutoUpdate: support_auto_update.yaml SVM: svm.yaml Volume: volume.yaml VolumeAnalytics: volume_analytics.yaml diff --git a/conf/restperf/9.14.1/nvmf_rdma_port.yaml b/conf/restperf/9.14.1/nvmf_rdma_port.yaml new file mode 100644 index 000000000..4893cb273 --- /dev/null +++ b/conf/restperf/9.14.1/nvmf_rdma_port.yaml @@ -0,0 +1,29 @@ + +name: NvmfRdmaPort +query: api/cluster/counter/tables/nvmf_rdma_port +object: nvmf_rdma_port + +counters: + - ^^id + - ^node.name => node + - ^port.id => lif + - ^port_ip_addr + - ^svm.name => svm + - average_latency => avg_latency + - average_other_latency => avg_other_latency + - average_read_latency => avg_read_latency + - average_write_latency => avg_write_latency + - other_ops + - read_data + - read_ops + - total_data + - total_ops + - write_data + - write_ops + +export_options: + instance_keys: + - lif + - node + - port_ip_addr + - svm diff --git a/conf/restperf/9.14.1/nvmf_tcp_port.yaml b/conf/restperf/9.14.1/nvmf_tcp_port.yaml new file mode 100644 index 000000000..b1986fb95 --- /dev/null +++ b/conf/restperf/9.14.1/nvmf_tcp_port.yaml @@ -0,0 +1,29 @@ + +name: NvmfTcpPort +query: api/cluster/counter/tables/nvmf_tcp_port +object: nvmf_tcp_port + +counters: + - ^^id + - ^node.name => node + - ^port.id => lif + - ^port_ip_addr + - ^svm.name => svm + - average_latency => avg_latency + - average_other_latency => avg_other_latency + - average_read_latency => avg_read_latency + - average_write_latency => avg_write_latency + - other_ops + - read_data + - read_ops + - total_data + - total_ops + - write_data + - write_ops + +export_options: + instance_keys: + - lif + - node + - port_ip_addr + - svm \ No newline at end of file diff --git a/conf/restperf/default.yaml b/conf/restperf/default.yaml index ab10b8d26..58ebc6f0c 100644 --- a/conf/restperf/default.yaml +++ b/conf/restperf/default.yaml @@ -44,6 +44,8 @@ objects: NFSv41: nfsv4_1.yaml NFSv42: nfsv4_2.yaml NFSv4: nfsv4.yaml +# NvmfRdmaPort: nvmf_rdma_port.yaml +# NvmfTcpPort: nvmf_tcp_port.yaml Volume: volume.yaml VolumeSvm: volume_svm.yaml WAFLCompBin: wafl_comp_aggr_vol_bin.yaml diff --git a/conf/zapi/cdot/9.8.0/ems_destination.yaml b/conf/zapi/cdot/9.8.0/ems_destination.yaml new file mode 100644 index 000000000..e2f8bd1ea --- /dev/null +++ b/conf/zapi/cdot/9.8.0/ems_destination.yaml @@ -0,0 +1,27 @@ +name: EmsDestination +query: ems-event-notification-destination-get-iter +object: ems_destination + +counters: + event-notification-destination-info: + - ^^certificate-authority => certificate + - ^^name => name + - ^^type => type + - destination: + - ^^string => destination + +collect_only_labels: true + +plugins: + - LabelAgent: + exclude_equals: + - destination `` + +export_options: + instance_keys: + - destination + - name + - type + instance_labels: + - certificate + diff --git a/conf/zapi/cdot/9.8.0/snapmirror.yaml b/conf/zapi/cdot/9.8.0/snapmirror.yaml index ee8f161ba..393227baa 100644 --- a/conf/zapi/cdot/9.8.0/snapmirror.yaml +++ b/conf/zapi/cdot/9.8.0/snapmirror.yaml @@ -16,7 +16,6 @@ counters: - ^relationship-status - ^relationship-type - ^schedule - - ^source-node - ^source-volume - ^source-vserver - ^unhealthy-reason @@ -44,12 +43,10 @@ export_options: - destination_vserver - relationship_id - source_cluster - - source_node - source_volume - source_vserver instance_labels: - derived_relationship_type - - destination_node_limit - group_type - healthy - last_transfer_error @@ -61,6 +58,5 @@ export_options: - relationship_status - relationship_type - schedule - - source_node_limit - unhealthy_reason \ No newline at end of file diff --git a/conf/zapi/cdot/9.8.0/volume.yaml b/conf/zapi/cdot/9.8.0/volume.yaml index 90aa6de3e..89e3f78e3 100644 --- a/conf/zapi/cdot/9.8.0/volume.yaml +++ b/conf/zapi/cdot/9.8.0/volume.yaml @@ -37,6 +37,8 @@ counters: - ^auto-snapshots-enabled => auto_snapshots_enabled - ^snapshot-policy - snapshot-count + - volume-snapshot-autodelete-attributes: + - ^is-autodelete-enabled => snapshot_autodelete - volume-space-attributes: - expected-available - filesystem-size => filesystem_size @@ -118,6 +120,7 @@ export_options: - is_sis_volume - node_root - root_volume + - snapshot_autodelete - snapshot_policy - state - svm_root diff --git a/conf/zapi/default.yaml b/conf/zapi/default.yaml index 506a5e9bd..caf17fa86 100644 --- a/conf/zapi/default.yaml +++ b/conf/zapi/default.yaml @@ -11,6 +11,7 @@ objects: CIFSSession: cifs_session.yaml ClusterPeer: clusterpeer.yaml Disk: disk.yaml + EmsDestination: ems_destination.yaml LIF: lif.yaml Lun: lun.yaml # NetPort: netPort.yaml diff --git a/conf/zapiperf/cdot/9.8.0/nvmf_rdma_port.yaml b/conf/zapiperf/cdot/9.8.0/nvmf_rdma_port.yaml new file mode 100644 index 000000000..0ab2fabdf --- /dev/null +++ b/conf/zapiperf/cdot/9.8.0/nvmf_rdma_port.yaml @@ -0,0 +1,31 @@ + +name: NvmfRdmaPort +query: nvmf_rdma_port +object: nvmf_rdma_port + +instance_key: uuid + +counters: + - avg_latency + - avg_other_latency + - avg_read_latency + - avg_write_latency + - instance_uuid + - node_name => node + - other_ops + - port_id => lif + - port_ip_addr + - read_data + - read_ops + - total_data + - total_ops + - vserver_name => svm + - write_data + - write_ops + +export_options: + instance_keys: + - lif + - node + - port_ip_addr + - svm diff --git a/conf/zapiperf/cdot/9.8.0/nvmf_tcp_port.yaml b/conf/zapiperf/cdot/9.8.0/nvmf_tcp_port.yaml new file mode 100644 index 000000000..4d0929776 --- /dev/null +++ b/conf/zapiperf/cdot/9.8.0/nvmf_tcp_port.yaml @@ -0,0 +1,31 @@ + +name: NvmfTcpPort +query: nvmf_tcp_port +object: nvmf_tcp_port + +instance_key: uuid + +counters: + - avg_latency + - avg_other_latency + - avg_read_latency + - avg_write_latency + - instance_uuid + - node_name => node + - other_ops + - port_id => lif + - port_ip_addr + - read_data + - read_ops + - total_data + - total_ops + - vserver_name => svm + - write_data + - write_ops + +export_options: + instance_keys: + - lif + - node + - port_ip_addr + - svm diff --git a/conf/zapiperf/default.yaml b/conf/zapiperf/default.yaml index 979b21e6e..ae68ea82f 100644 --- a/conf/zapiperf/default.yaml +++ b/conf/zapiperf/default.yaml @@ -49,6 +49,8 @@ objects: NFSv41: nfsv4_1.yaml NFSv42: nfsv4_2.yaml NFSv4: nfsv4.yaml +# NvmfRdmaPort: nvmf_rdma_port.yaml +# NvmfTcpPort: nvmf_tcp_port.yaml OntapS3SVM: ontap_s3_svm.yaml SMB2: smb2.yaml Volume: volume.yaml diff --git a/container/prometheus/ems_alert_rules.yml b/container/prometheus/ems_alert_rules.yml index 5ee20919d..29fb3253e 100644 --- a/container/prometheus/ems_alert_rules.yml +++ b/container/prometheus/ems_alert_rules.yml @@ -25,6 +25,28 @@ groups: annotations: summary: "LUN {{ $labels.lun_path }}, vol {{ $labels.volume_name }} (DSID {{ $labels.volume_dsid }}) destroyed (UUID: {{ $labels.object_uuid }})." + - alert: LUN Offline + expr: last_over_time(ems_events{message="LUN.offline"}[5m]) == 1 + labels: + severity: > + {{- if $labels.severity -}} + {{- if eq $labels.severity "alert" -}} + critical + {{- else if eq $labels.severity "error" -}} + warning + {{- else if eq $labels.severity "emergency" -}} + critical + {{- else if eq $labels.severity "notice" -}} + info + {{- else if eq $labels.severity "informational" -}} + info + {{- else -}} + {{ $labels.severity }} + {{- end -}} + {{- end -}} + annotations: + summary: "LUN {{ $labels.lun_path }}, vol {{ $labels.volume_name }} (DSID {{ $labels.volume_dsid }}) was brought offline (UUID: {{ $labels.object_uuid }})." + - alert: NVMe Namespace Destroyed expr: last_over_time(ems_events{message="NVMeNS.destroy"}[5m]) == 1 labels: diff --git a/go.mod b/go.mod index 2ef5572ab..d4f641769 100644 --- a/go.mod +++ b/go.mod @@ -9,15 +9,15 @@ require ( github.com/hashicorp/go-version v1.6.0 github.com/olekukonko/tablewriter v0.0.5 github.com/rs/zerolog v1.30.0 - github.com/shirou/gopsutil/v3 v3.23.6 + github.com/shirou/gopsutil/v3 v3.23.7 github.com/spf13/cobra v1.7.0 github.com/tidwall/gjson v1.15.0 github.com/tidwall/pretty v1.2.1 github.com/tidwall/sjson v1.2.5 github.com/zekroTJA/timedmap v1.5.1 - golang.org/x/sys v0.10.0 - golang.org/x/term v0.10.0 - golang.org/x/text v0.11.0 + golang.org/x/sys v0.11.0 + golang.org/x/term v0.11.0 + golang.org/x/text v0.12.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.sum b/go.sum index 16166c83a..08a6d81e9 100644 --- a/go.sum +++ b/go.sum @@ -84,6 +84,8 @@ github.com/shirou/gopsutil/v3 v3.23.5 h1:5SgDCeQ0KW0S4N0znjeM/eFHXXOKyv2dVNgRq/c github.com/shirou/gopsutil/v3 v3.23.5/go.mod h1:Ng3Maa27Q2KARVJ0SPZF5NdrQSC3XHKP8IIWrHgMeLY= github.com/shirou/gopsutil/v3 v3.23.6 h1:5y46WPI9QBKBbK7EEccUPNXpJpNrvPuTD0O2zHEHT08= github.com/shirou/gopsutil/v3 v3.23.6/go.mod h1:j7QX50DrXYggrpN30W0Mo+I4/8U2UUIQrnrhqUeWrAU= +github.com/shirou/gopsutil/v3 v3.23.7 h1:C+fHO8hfIppoJ1WdsVm1RoI0RwXoNdfTK7yWXV0wVj4= +github.com/shirou/gopsutil/v3 v3.23.7/go.mod h1:c4gnmoRC0hQuaLqvxnx1//VXQ0Ms/X9UnJF8pddY5z4= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -138,14 +140,20 @@ golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/grafana/dashboards/cmode/compliance.json b/grafana/dashboards/cmode/compliance.json index 834c8163f..17d67e639 100644 --- a/grafana/dashboards/cmode/compliance.json +++ b/grafana/dashboards/cmode/compliance.json @@ -92,2698 +92,14 @@ "x": 0, "y": 0 }, - "id": 174, + "id": 176, "options": { - "content": "View ONTAP Security Hardening Guide https://www.netapp.com/media/10674-tr4569.pdf for more details.", + "content": "These panels were moved to the `ONTAP: Security` dashboard.", "mode": "markdown" }, "pluginVersion": "8.1.8", "title": "Important Information about Compliance dashboard", "type": "text" - }, - { - "collapsed": true, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 2 - }, - "id": 152, - "panels": [ - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "green", - "mode": "fixed" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": true - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Compliant" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max", - "value": 100 - }, - { - "id": "mappings", - "value": [ - { - "options": { - "-Infinity": { - "index": 0, - "text": "0%" - }, - "Infinity": { - "index": 1, - "text": "0%" - } - }, - "type": "value" - }, - { - "options": { - "from": -9999, - "result": { - "index": 2, - "text": "0%" - }, - "to": -1 - }, - "type": "range" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 16, - "x": 0, - "y": 3 - }, - "id": 161, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count(group by (datacenter, cluster)(support_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", asup_enabled=\"true\", asup_https_configured!=\"https\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", telnet_enabled=\"true\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", rsh_enabled=\"true\"} or group by (datacenter, cluster)(security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", hash_algorithm=\"md5\"}) > 0 or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"\"} or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"none\"} or group by (datacenter, cluster) (security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", locked=\"false\"}) > 0 or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"cluster\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$Cluster\"} or count by (datacenter, cluster) (ntpserver_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) < 1 or security_audit_destination_status{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", protocol!=\"tcp_encrypted\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", fips_enabled=\"false\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", type=\"admin\", ciphers=~\".*_cbc.*\"} or group by (datacenter, cluster) ((svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", audit_protocol_enabled=\"false\"}) or security_ssh_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"svm\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}))) or vector(0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "NonCompliantCluster", - "refId": "A" - }, - { - "exemplar": false, - "expr": "count by (datacenter)(security_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}) or vector (0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "TotalCluster", - "refId": "B" - } - ], - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "CompliantCluster", - "binary": { - "left": "TotalCluster", - "operator": "-", - "reducer": "sum", - "right": "NonCompliantCluster" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "", - "binary": { - "left": "CompliantCluster", - "operator": "/", - "reducer": "sum", - "right": "TotalCluster" - }, - "mode": "binary", - "reduce": { - "include": [ - "Saml", - "Certificate" - ], - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Compliant", - "binary": { - "left": "CompliantCluster / TotalCluster", - "operator": "*", - "reducer": "sum", - "right": "100" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Certificate": true, - "ComliantCluster": true, - "ComliantCluster / TotalCluster": true, - "Compliant": false, - "Compliant / Total": false, - "CompliantCluster": true, - "CompliantCluster / TotalCluster": true, - "NonCompliantCluster": true, - "Saml": true, - "Saml / Certificate": false, - "Time": true, - "Total": true, - "TotalCluster": true, - "perc": true - }, - "indexByName": {}, - "renameByName": { - "PercentCompliant": "", - "Saml / Certificate": "perc", - "Time": "" - } - } - } - ], - "type": "table" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "links": [], - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Compliant" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "from": -9999, - "result": { - "index": 0, - "text": "0" - }, - "to": -1 - }, - "type": "range" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 16, - "y": 3 - }, - "id": 166, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count by (datacenter) (security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) or vector(0)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - }, - { - "exemplar": false, - "expr": "count(group by (datacenter, cluster)(support_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", asup_enabled=\"true\", asup_https_configured!=\"https\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", telnet_enabled=\"true\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", rsh_enabled=\"true\"} or group by (datacenter, cluster)(security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", hash_algorithm=\"md5\"}) > 0 or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"\"} or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"none\"} or group by (datacenter, cluster) (security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", locked=\"false\"}) > 0 or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"cluster\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$Cluster\"} or count by (datacenter, cluster) (ntpserver_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) < 1 or security_audit_destination_status{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", protocol!=\"tcp_encrypted\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", fips_enabled=\"false\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", type=\"admin\", ciphers=~\".*_cbc.*\"} or group by (datacenter, cluster) ((svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", audit_protocol_enabled=\"false\"}) or security_ssh_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"svm\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}))) or vector(0)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "title": "Compliant", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Compliant", - "binary": { - "left": "Value #A", - "operator": "-", - "reducer": "sum", - "right": "Value #B" - }, - "mode": "binary", - "reduce": { - "include": [ - "count((security_certificate_labels{datacenter=\"$Datacenter\", cluster=~\"$Cluster\", certificateExpiryStatus=\"active\", certificateIssuerType=\"self_signed\"} * on(datacenter, cluster) security_labels{datacenter=\"$Datacenter\", cluster=~\"$Cluster\", fips_enabled=\"true\",telnet_enabled=\"false\"} * on (datacenter, cluster) security_login_labels{datacenter=\"$Datacenter\", cluster=~\"$Cluster\", scope=\"cluster\", banner!=\"\"} * on (datacenter, cluster) (count by (datacenter, cluster) (ntpserver_labels{datacenter=\"$Datacenter\", cluster=~\"$Cluster\"}) == 3) * on (datacenter, cluster) support_labels{datacenter=\"$Datacenter\", cluster=~\"$Cluster\", asup_enabled=\"true\"} * on(datacenter, cluster) security_account_labels{datacenter=\"$Datacenter\", cluster=~\"$Cluster\", locked=\"true\"} * on(datacenter, cluster) (sum by (datacenter, cluster) (security_account_certificateuser{ddatacenter=\"$Datacenter\", cluster=~\"$Cluster\"}) > 0) * on(datacenter, cluster) (sum by (datacenter, cluster) (security_account_samluser{datacenter=\"$Datacenter\", cluster=~\"$Cluster\"}) > 0) * on(datacenter, cluster) (sum by (datacenter, cluster) (security_account_ldapeuser{datacenter=\"$Datacenter\", cluster=~\"$Cluster\"}) > 0) * on(datacenter, cluster) (sum by (datacenter, cluster) (security_account_localuser{datacenter=\"$Datacenter\", cluster=~\"$Cluster\"}) > 0) * on(datacenter, cluster) (sum by (datacenter, cluster) (security_account_activediruser{ddatacenter=\"$Datacenter\", cluster=~\"$Cluster\"}) > 0) * on(datacenter, cluster) (count by (datacenter, cluster, encryption_state) (cluster_peer_labels{datacenter=\"$Datacenter\", cluster=~\"$Cluster\", encryption_state!=\"\"}) > 0)) unless (count by (datacenter, cluster) (security_account_labels{datacenter=\"$Datacenter\", cluster=~\"$Cluster\", hash_algorithm=\"md5\"}) > 0) unless (count by (datacenter, cluster) (svm_labels{datacenter=\"$Datacenter\", cluster=~\"$Cluster\", ciphers=~\".*_cbc.*\"}))) or vector(0)" - ], - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Value #A": true, - "Value #B": true, - "datacenter": true - }, - "indexByName": {}, - "renameByName": {} - } - } - ], - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "links": [], - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 3 - }, - "id": 167, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count(group by (datacenter, cluster)(support_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", asup_enabled=\"true\", asup_https_configured!=\"https\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", telnet_enabled=\"true\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", rsh_enabled=\"true\"} or group by (datacenter, cluster)(security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", hash_algorithm=\"md5\"}) > 0 or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"\"} or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"none\"} or group by (datacenter, cluster) (security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", locked=\"false\"}) > 0 or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"cluster\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$Cluster\"} or count by (datacenter, cluster) (ntpserver_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) < 1 or security_audit_destination_status{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", protocol!=\"tcp_encrypted\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", fips_enabled=\"false\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", type=\"admin\", ciphers=~\".*_cbc.*\"} or group by (datacenter, cluster) ((svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", audit_protocol_enabled=\"false\"}) or security_ssh_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"svm\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}))) or vector(0)", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Not Compliant", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "❌ means this attribute is non-compliant", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "transparent", - "mode": "fixed" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Autosupport Https Transport" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 0, - "text": "❌ Disabled" - }, - "true": { - "index": 1, - "text": "Enabled" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.width", - "value": 231 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Default Admin User" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 0, - "text": "Disabled" - }, - "true": { - "index": 1, - "text": "❌ Enabled" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.width", - "value": 165 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "MD5 in use" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "index": 1, - "text": "No" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "index": 0, - "text": "No" - } - }, - "type": "special" - }, - { - "options": { - "from": 1, - "result": { - "index": 2, - "text": "❌ Yes" - }, - "to": 99999999 - }, - "type": "range" - } - ] - }, - { - "id": "custom.width", - "value": 114 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Remote Shell" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 0, - "text": "Disabled" - }, - "true": { - "index": 1, - "text": "❌ Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "empty", - "result": { - "index": 2, - "text": "Disabled" - } - }, - "type": "special" - }, - { - "options": { - "match": "null", - "result": { - "index": 3, - "text": "Disabled" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.width", - "value": 122 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Telnet" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 0, - "text": "Disabled" - }, - "true": { - "index": 1, - "text": "❌ Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "index": 2, - "text": "Disabled" - } - }, - "type": "special" - }, - { - "options": { - "match": "empty", - "result": { - "index": 3, - "text": "Disabled" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.width", - "value": 99 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Global FIPS" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 0, - "text": "❌ Disabled" - }, - "true": { - "index": 1, - "text": "Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "index": 2, - "text": "❌ Disabled" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.width", - "value": 112 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Insecure SSH Settings" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "true": { - "index": 0, - "text": "❌ Yes" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "index": 1, - "text": "No" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.width", - "value": 186 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Login Banner" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "match": "empty", - "result": { - "index": 0, - "text": "❌ Disabled" - } - }, - "type": "special" - }, - { - "options": { - "match": "nan", - "result": { - "index": 1, - "text": "Enabled" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.width", - "value": 126 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Network Time Protocol" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "index": 0, - "text": "❌ Not Configured" - }, - "1": { - "index": 1, - "text": "❌ 1 out of 3" - }, - "2": { - "index": 2, - "text": "❌ 2 out of 3" - } - }, - "type": "value" - }, - { - "options": { - "from": 3, - "result": { - "index": 3, - "text": "Configured" - }, - "to": 9999 - }, - "type": "range" - } - ] - }, - { - "id": "custom.width", - "value": 169 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Local Users" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "index": 0, - "text": "Unconfigured" - } - }, - "type": "value" - }, - { - "options": { - "from": 1, - "result": { - "index": 1, - "text": "Configured" - }, - "to": 9999 - }, - "type": "range" - } - ] - }, - { - "id": "custom.width", - "value": 119 - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "unit", - "value": "short" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Certificate Users" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "index": 0, - "text": "Unconfigured" - } - }, - "type": "value" - }, - { - "options": { - "from": 1, - "result": { - "index": 1, - "text": "Configured" - }, - "to": 9999 - }, - "type": "range" - } - ] - }, - { - "id": "custom.width", - "value": 159 - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "unit", - "value": "short" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Saml Users" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "index": 0, - "text": "Unconfigured" - } - }, - "type": "value" - }, - { - "options": { - "from": 1, - "result": { - "index": 1, - "text": "Configured" - }, - "to": 9999 - }, - "type": "range" - } - ] - }, - { - "id": "custom.width", - "value": 121 - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "unit", - "value": "short" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Ldap Users" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "index": 0, - "text": "Unconfigured" - } - }, - "type": "value" - }, - { - "options": { - "from": 1, - "result": { - "index": 1, - "text": "Configured" - }, - "to": 9999 - }, - "type": "range" - } - ] - }, - { - "id": "custom.width", - "value": 124 - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "unit", - "value": "short" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Active Directory Users" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "index": 0, - "text": "Unconfigured" - } - }, - "type": "value" - }, - { - "options": { - "from": 1, - "result": { - "index": 1, - "text": "Configured" - }, - "to": 9999 - }, - "type": "range" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.width", - "value": 185 - }, - { - "id": "unit", - "value": "short" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cluster Peering" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "index": 1, - "text": "Encrypted" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "index": 0, - "text": "Not Peered" - } - }, - "type": "special" - }, - { - "options": { - "from": 1, - "result": { - "index": 2, - "text": "❌ Not Encrypted" - }, - "to": 9999999999 - }, - "type": "range" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.width", - "value": 135 - }, - { - "id": "unit", - "value": "short" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cluster Certificate Validity" - }, - "properties": [ - { - "id": "custom.filterable", - "value": true - }, - { - "id": "mappings", - "value": [ - { - "options": { - "active": { - "index": 0, - "text": "Active" - }, - "expired": { - "index": 2, - "text": "❌ Expired" - }, - "expiring": { - "index": 1, - "text": "Active (Expiring < 60 days)" - }, - "unknown": { - "index": 3, - "text": "Unknown" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "index": 4, - "text": "Unknown" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.width", - "value": 206 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Certificate Issuer Type" - }, - "properties": [ - { - "id": "custom.filterable", - "value": true - }, - { - "id": "mappings", - "value": [ - { - "options": { - "ca_signed": { - "index": 1, - "text": "CA-Signed" - }, - "self_signed": { - "index": 0, - "text": "Self-Signed" - }, - "unknown": { - "index": 2, - "text": "Unknown" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "index": 3, - "text": "Unknown" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.width", - "value": 187 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Compliant" - }, - "properties": [ - { - "id": "custom.filterable", - "value": true - }, - { - "id": "mappings", - "value": [ - { - "options": { - "1": { - "index": 0, - "text": "❌ No" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "index": 1, - "text": "Yes" - } - }, - "type": "special" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 170, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "support_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", asup_https_configured=\"https\"}", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "exemplar": false, - "expr": "security_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "B" - }, - { - "exemplar": false, - "expr": "security_account_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", methods=~\".*password.*\",role_name=\"admin\", user_name=\"admin\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "C" - }, - { - "exemplar": false, - "expr": "count by (datacenter,cluster,hash_algorithm)(security_account_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", hash_algorithm=\"md5\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "D" - }, - { - "exemplar": false, - "expr": "count by (datacenter, cluster, insecured)(svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", insecured=\"true\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "E" - }, - { - "exemplar": false, - "expr": "security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",scope=\"cluster\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$Cluster\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "F" - }, - { - "exemplar": false, - "expr": "count by (datacenter, cluster) (ntpserver_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "G" - }, - { - "exemplar": false, - "expr": "sum by (datacenter, cluster) (cluster_peer_non_encrypted{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "J" - }, - { - "exemplar": false, - "expr": "sum by (datacenter, cluster) (security_account_localuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "K" - }, - { - "exemplar": false, - "expr": "sum by (datacenter, cluster) (security_account_samluser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "I" - }, - { - "exemplar": false, - "expr": "sum by (datacenter, cluster) (security_account_activediruser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "L" - }, - { - "exemplar": false, - "expr": "sum by (datacenter, cluster) (security_account_ldapuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "M" - }, - { - "exemplar": false, - "expr": "sum by (datacenter, cluster) (security_account_certificateuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "N" - }, - { - "exemplar": false, - "expr": "security_certificate_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "O" - }, - { - "exemplar": false, - "expr": "group by (datacenter, cluster)(support_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", asup_enabled=\"true\", asup_https_configured!=\"https\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", telnet_enabled=\"true\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", rsh_enabled=\"true\"} or group by (datacenter, cluster)(security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", hash_algorithm=\"md5\"}) > 0 or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"\"} or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"none\"} or group by (datacenter, cluster) (security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", locked=\"false\"}) > 0 or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"cluster\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$Cluster\"} or count by (datacenter, cluster) (ntpserver_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) < 1 or security_audit_destination_status{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", protocol!=\"tcp_encrypted\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", fips_enabled=\"false\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", type=\"admin\", ciphers=~\".*_cbc.*\"} or group by (datacenter, cluster) ((svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", audit_protocol_enabled=\"false\"}) or security_ssh_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"svm\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}))", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "P" - } - ], - "title": "Cluster Compliance", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "asup_enabled", - "cluster", - "fips_enabled", - "rsh_enabled", - "telnet_enabled", - "locked", - "Value #D", - "insecured", - "banner", - "Value #G", - "Value #K", - "Value #I", - "Value #L", - "Value #M", - "Value #N", - "certificateExpiryStatus", - "certificateIssuerType", - "Value #P", - "Value #J" - ] - } - } - }, - { - "id": "merge", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Time 1": true, - "Time 2": true, - "Value #B": true, - "Value #D": false, - "Value #E": false, - "Value #G": false, - "__name__": true, - "__name__ 1": true, - "__name__ 2": true, - "datacenter": true, - "datacenter 1": true, - "datacenter 2": true, - "fips_enabled": false, - "hash_algorithm": false, - "instance": true, - "instance 1": true, - "instance 2": true, - "job": true, - "job 1": true, - "job 2": true, - "locked": false, - "methods": true - }, - "indexByName": { - "Value #D": 11, - "Value #G": 7, - "Value #I": 13, - "Value #J": 12, - "Value #K": 17, - "Value #L": 14, - "Value #M": 15, - "Value #N": 16, - "Value #P": 0, - "asup_enabled": 8, - "banner": 6, - "certificateExpiryStatus": 2, - "certificateIssuerType": 18, - "cluster": 1, - "fips_enabled": 3, - "insecured": 5, - "locked": 9, - "rsh_enabled": 10, - "telnet_enabled": 4 - }, - "renameByName": { - "Value #A": "Autosupport Https Transport", - "Value #C": "Default Admin User", - "Value #D": "MD5 in use", - "Value #G": "Network Time Protocol", - "Value #I": "Saml Users", - "Value #J": "Cluster Peering", - "Value #K": "Local Users", - "Value #L": "Active Directory Users", - "Value #M": "Ldap Users", - "Value #N": "Certificate Users", - "Value #P": "Compliant", - "activediruser": "Active Directory Users", - "asupEnabled": "", - "asupHttpsConfigured": "", - "asup_enabled": "Autosupport Https Transport", - "banner": "Login Banner", - "certificateExpiryStatus": "Cluster Certificate Validity", - "certificateIssuerType": "Certificate Issuer Type", - "certificateuser": "Certificate Users", - "cluster": "Cluster", - "encryption_state": "Cluster Peering", - "fips_enabled": "Global FIPS", - "insecured": "Insecure SSH Settings", - "ldapuser": "Ldap Users", - "localuser": "Local Users", - "locked": "Default Admin User", - "ntp": "Network Time Protocol", - "rsh_enabled": "Remote Shell", - "samluser": "Saml Users", - "telnet_enabled": "Telnet" - } - } - } - ], - "type": "table" - } - ], - "title": "Cluster Compliance", - "type": "row" - }, - { - "collapsed": true, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 15, - "panels": [ - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "green", - "mode": "fixed" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": true - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Compliant" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max", - "value": 100 - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 16, - "x": 0, - "y": 4 - }, - "id": 165, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count(group by (datacenter, cluster, svm) ((svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", audit_protocol_enabled=\"false\"}) or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", scope=\"svm\", banner=\"\"} or (svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"} unless on (svm) security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm!=\"$Cluster\", svm=~\"$SVM\"}))) or vector(0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "NonCompliantSvm", - "refId": "A" - }, - { - "exemplar": false, - "expr": "count(svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\"}) or vector (1) ", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "TotalSvm", - "refId": "B" - } - ], - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "CompliantSvm", - "binary": { - "left": "TotalSvm", - "operator": "-", - "reducer": "sum", - "right": "NonCompliantSvm" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "", - "binary": { - "left": "CompliantSvm", - "operator": "/", - "reducer": "sum", - "right": "TotalSvm" - }, - "mode": "binary", - "reduce": { - "include": [ - "Saml", - "Certificate" - ], - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Compliant", - "binary": { - "left": "CompliantSvm / TotalSvm", - "operator": "*", - "reducer": "sum", - "right": "100" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Certificate": true, - "Compliant": false, - "Compliant / Total": false, - "CompliantCluster": true, - "CompliantCluster / TotalCluster": true, - "CompliantSvm": true, - "CompliantSvm / TotalSvm": true, - "NonCompliantSvm": true, - "Saml": true, - "Saml / Certificate": false, - "Time": true, - "Total": true, - "TotalCluster": true, - "TotalSvm": true, - "perc": true - }, - "indexByName": {}, - "renameByName": { - "PercentCompliant": "", - "Saml / Certificate": "perc", - "Time": "" - } - } - } - ], - "type": "table" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "links": [], - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 16, - "y": 4 - }, - "id": 168, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count(svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\"}) or vector(0)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "exemplar": false, - "expr": "count(group by (datacenter, cluster, svm) ((svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", audit_protocol_enabled=\"false\"}) or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", scope=\"svm\", banner=\"\"} or (svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"} unless on (svm) security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm!=\"$Cluster\", svm=~\"$SVM\"}))) or vector(0)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "B" - } - ], - "title": "Compliant", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Compliant", - "binary": { - "left": "Value #A", - "operator": "-", - "reducer": "sum", - "right": "Value #B" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Value #A": true, - "Value #B": true - }, - "indexByName": {}, - "renameByName": {} - } - } - ], - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "links": [], - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 4 - }, - "id": 164, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count(group by (datacenter, cluster, svm) ((svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", audit_protocol_enabled=\"false\"}) or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", scope=\"svm\", banner=\"\"} or (svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"} unless on (svm) security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm!=\"$Cluster\", svm=~\"$SVM\"})))", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Not Compliant", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "❌ means this attribute is non-compliant", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "transparent", - "mode": "fixed" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "cluster" - }, - "properties": [ - { - "id": "displayName", - "value": "Cluster" - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Login Banner" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "match": "empty", - "result": { - "index": 0, - "text": "❌ Disabled" - } - }, - "type": "special" - }, - { - "options": { - "match": "null", - "result": { - "index": 1, - "text": "❌ Disabled" - } - }, - "type": "special" - }, - { - "options": { - "match": "nan", - "result": { - "index": 2, - "text": "Enabled" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Audit Log" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 1, - "text": "❌ Disabled" - }, - "true": { - "index": 0, - "text": "Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "empty", - "result": { - "index": 2, - "text": "N/A" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "LDAP Payload Signing" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "index": 0, - "text": "Disabled" - }, - "1": { - "index": 1, - "text": "Enabled" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "unit", - "value": "locale" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Insecure SSH Settings" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "true": { - "index": 0, - "text": "❌ Yes" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "index": 1, - "text": "No" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "NTML Authentication" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "lm_ntlm_ntlmv2_krb": { - "index": 0, - "text": "Enabled" - }, - "ntlm_ntlmv2_krb": { - "index": 1, - "text": "Enabled" - }, - "ntlmv2_krb": { - "index": 2, - "text": "Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "nan", - "result": { - "index": 3, - "text": "❌ Disabled" - } - }, - "type": "special" - }, - { - "options": { - "match": "empty", - "result": { - "index": 4, - "text": "N/A" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "LDAP Encryption" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "index": 0, - "text": "Disabled" - }, - "1": { - "index": 1, - "text": "Enabled" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "unit", - "value": "locale" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SMB Encryption Enabled" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 1, - "text": "Disabled" - }, - "true": { - "index": 0, - "text": "Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "empty", - "result": { - "index": 2, - "text": "N/A" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SMB Signing Enabled" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 0, - "text": "Disabled" - }, - "true": { - "index": 1, - "text": "Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "empty", - "result": { - "index": 2, - "text": "N/A" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kerberos V5" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 1, - "text": "Disabled" - }, - "true": { - "index": 0, - "text": "Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "empty", - "result": { - "index": 2, - "text": "N/A" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CHAP Settings" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "pattern": ".*chap.*", - "result": { - "index": 0, - "text": "Enabled" - } - }, - "type": "regex" - }, - { - "options": { - "match": "nan", - "result": { - "index": 1, - "text": "Disabled" - } - }, - "type": "special" - }, - { - "options": { - "match": "empty", - "result": { - "index": 2, - "text": "N/A" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "NIS Authentication" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 1, - "text": "Disabled" - }, - "true": { - "index": 0, - "text": "❌ Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "empty", - "result": { - "index": 2, - "text": "N/A" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Fpolicy Status Active" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 1, - "text": "Disabled" - }, - "true": { - "index": 0, - "text": "Enabled" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SVM" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Compliant" - }, - "properties": [ - { - "id": "custom.filterable", - "value": true - }, - { - "id": "mappings", - "value": [ - { - "options": { - "1": { - "index": 1, - "text": "❌ No" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "index": 0, - "text": "Yes" - } - }, - "type": "special" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 172, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "Compliant" - } - ] - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "exemplar": false, - "expr": "security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", scope=\"svm\", svm=~\"$SVM\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm!=\"$Cluster\", svm=~\"$SVM\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "C" - }, - { - "exemplar": false, - "expr": "count by (datacenter, cluster, insecured)(svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", insecured=\"true\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "E" - }, - { - "exemplar": false, - "expr": "svm_ldap_signed{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "G" - }, - { - "exemplar": false, - "expr": "svm_ldap_encrypted{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "I" - }, - { - "exemplar": false, - "expr": "group by (datacenter, cluster, svm) ((svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", audit_protocol_enabled=\"false\"}) or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", scope=\"svm\", banner=\"\"} or (svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"} unless on (svm) security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm!=\"$Cluster\", svm=~\"$SVM\"}))", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "title": "SVM Compliance", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "audit_protocol_enabled", - "cifs_ntlm_enabled", - "cluster", - "iscsi_authentication_type", - "nfs_kerberos_protocol_enabled", - "nis_authentication_enabled", - "smb_encryption_required", - "smb_signing_required", - "svm", - "banner", - "insecured", - "Value #G", - "Value #I", - "Value #B" - ] - } - } - }, - { - "id": "merge", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Time 1": true, - "Time 2": true, - "Value #B": false, - "Value #C": true, - "Value #D": false, - "Value #E": false, - "Value #G": false, - "__name__": true, - "__name__ 1": true, - "__name__ 2": true, - "audit_protocol_enabled": false, - "banner": false, - "cifs_ntlm_enabled": false, - "datacenter": true, - "datacenter 1": true, - "datacenter 2": true, - "fips_enabled": false, - "hash_algorithm": false, - "instance": true, - "instance 1": true, - "instance 2": true, - "iscsi_authentication_type": false, - "job": true, - "job 1": true, - "job 2": true, - "locked": true, - "methods": true, - "nfs_kerberos_protocol_enabled": false, - "smb_encryption_required": false, - "smb_signing_required": false - }, - "indexByName": { - "Value #B": 0, - "Value #G": 9, - "Value #I": 8, - "audit_protocol_enabled": 4, - "banner": 3, - "cifs_ntlm_enabled": 7, - "cluster": 1, - "insecured": 5, - "iscsi_authentication_type": 10, - "nfs_kerberos_protocol_enabled": 11, - "nis_authentication_enabled": 6, - "smb_encryption_required": 12, - "smb_signing_required": 13, - "svm": 2 - }, - "renameByName": { - "Value #A": "Autosupport Https Transport", - "Value #B": "Compliant", - "Value #D": "MD5 in use", - "Value #E": "", - "Value #G": "LDAP Payload Signing", - "Value #I": "LDAP Encryption", - "activediruser": "Active Directory Users", - "asupEnabled": "", - "asupHttpsConfigured": "", - "audit_protocol_enabled": "Audit Log", - "banner": "Login Banner", - "certificateuser": "Certificate Users", - "cifs_ntlm_enabled": "NTML Authentication", - "cluster": "", - "fips_enabled": "Global FIPS", - "fpolicy_enabled": "Fpolicy Status Active", - "insecured": "Insecure SSH Settings", - "iscsi_authentication_type": "CHAP Settings", - "ldapuser": "Ldap Users", - "localuser": "Local Users", - "nfs_kerberos_protocol_enabled": "Kerberos V5", - "nis_authentication_enabled": "NIS Authentication", - "nis_domain": "NIS Authentication", - "ntp": "Network Time Protocol", - "rsh_enabled": "Remote Shell", - "samluser": "Saml Users", - "smb_encryption_required": "SMB Encryption Enabled", - "smb_signing_required": "SMB Signing Enabled", - "svm": "SVM", - "telnet_enabled": "Telnet" - } - } - } - ], - "type": "table" - } - ], - "title": "Storage VMs Compliance", - "type": "row" } ], "refresh": "", @@ -2816,81 +132,6 @@ "regex": "", "skipUrlSync": false, "type": "datasource" - }, - { - "allValue": null, - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(svm_labels{system_type!=\"7mode\"},datacenter)", - "description": null, - "error": null, - "hide": 0, - "includeAll": false, - "label": null, - "multi": true, - "name": "Datacenter", - "options": [], - "query": { - "query": "label_values(svm_labels{system_type!=\"7mode\"},datacenter)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(svm_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\"},cluster)", - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "Cluster", - "options": [], - "query": { - "query": "label_values(svm_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\"},cluster)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(svm_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",root_svm=\"No\"},svm)", - "description": "Displaying only the data SVMs and omitting root SVMs", - "error": null, - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "SVM", - "options": [], - "query": { - "query": "label_values(svm_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",root_svm=\"No\"},svm)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "type": "query" } ] }, @@ -2914,5 +155,5 @@ "timezone": "", "title": "ONTAP: Compliance", "uid": "", - "version": 2 + "version": 3 } diff --git a/grafana/dashboards/cmode/security.json b/grafana/dashboards/cmode/security.json index c524073fb..8240a5105 100644 --- a/grafana/dashboards/cmode/security.json +++ b/grafana/dashboards/cmode/security.json @@ -83,6 +83,24 @@ } ], "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 213, + "options": { + "content": "View ONTAP Security Hardening Guide https://www.netapp.com/media/10674-tr4569.pdf for more details.", + "mode": "markdown" + }, + "pluginVersion": "8.1.8", + "title": "Important Information about Compliance dashboard", + "type": "text" + }, { "collapsed": false, "datasource": "${DS_PROMETHEUS}", @@ -90,7 +108,7 @@ "h": 1, "w": 24, "x": 0, - "y": 0 + "y": 2 }, "id": 185, "panels": [], @@ -117,15 +135,57 @@ ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Compliant" + }, + "properties": [ + { + "id": "max", + "value": 100 + }, + { + "id": "mappings", + "value": [ + { + "options": { + "-Infinity": { + "index": 0, + "text": "0" + }, + "Infinity": { + "index": 1, + "text": "0" + } + }, + "type": "value" + }, + { + "options": { + "from": -9999, + "result": { + "index": 2, + "text": "0" + }, + "to": -1 + }, + "type": "range" + } + ] + } + ] + } + ] }, "gridPos": { "h": 3, "w": 5, "x": 0, - "y": 1 + "y": 3 }, - "id": 207, + "id": 214, "options": { "colorMode": "value", "graphMode": "area", @@ -141,51 +201,68 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.3.4", + "pluginVersion": "8.1.8", "targets": [ { "datasource": "${DS_PROMETHEUS}", "exemplar": false, - "expr": "(count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\", isEncrypted=\"true\"}) or vector (0))\n+\n(count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\", isHardwareEncrypted=\"true\"}) or vector (0) )", + "expr": "count(group by (datacenter, cluster)(support_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", asup_enabled=\"true\", asup_https_configured!=\"https\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", telnet_enabled=\"true\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", rsh_enabled=\"true\"} or group by (datacenter, cluster)(security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", hash_algorithm=\"md5\"}) > 0 or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"\"} or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"none\"} or group by (datacenter, cluster) (security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", locked=\"false\"}) > 0 or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"cluster\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$Cluster\"} or count by (datacenter, cluster) (ntpserver_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) < 1 or security_audit_destination_status{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", protocol!=\"tcp_encrypted\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", fips_enabled=\"false\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", type=\"admin\", ciphers=~\".*_cbc.*\"} or group by (datacenter, cluster) ((svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", audit_protocol_enabled=\"false\"}) or security_ssh_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"svm\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}))) or vector(0)", "instant": true, "interval": "", - "legendFormat": "encrypted", + "legendFormat": "NonCompliantCluster", "refId": "A" }, { "datasource": "${DS_PROMETHEUS}", "exemplar": false, - "expr": "(count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\"}) or vector (1) )", + "expr": "count (security_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}) or vector (1)", "hide": false, "instant": true, "interval": "", - "legendFormat": "total", + "legendFormat": "TotalCluster", "refId": "B" } ], - "title": "Volume Encryption %", + "title": "Cluster Compliant %", "transformations": [ { "id": "calculateField", "options": { + "alias": "CompliantCluster", "binary": { - "left": "encrypted", - "operator": "/", + "left": "TotalCluster", + "operator": "-", "reducer": "sum", - "right": "total" + "right": "NonCompliantCluster" }, "mode": "binary", "reduce": { "reducer": "sum" }, - "replaceFields": true + "replaceFields": false } }, { "id": "calculateField", "options": { "binary": { - "left": "encrypted / total", + "left": "CompliantCluster", + "operator": "/", + "reducer": "sum", + "right": "TotalCluster" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Compliant", + "binary": { + "left": "CompliantCluster / TotalCluster", "operator": "*", "reducer": "sum", "right": "100" @@ -202,7 +279,7 @@ }, { "datasource": "${DS_PROMETHEUS}", - "description": "This panel requires a cluster with ONTAP 9.10+ and the Harvest REST collector", + "description": "", "fieldConfig": { "defaults": { "color": { @@ -220,15 +297,57 @@ ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Compliant" + }, + "properties": [ + { + "id": "max", + "value": 100 + }, + { + "id": "mappings", + "value": [ + { + "options": { + "-Infinity": { + "index": 1, + "text": "0" + }, + "Infinity": { + "index": 0, + "text": "0" + } + }, + "type": "value" + }, + { + "options": { + "from": -9999, + "result": { + "index": 2, + "text": "0" + }, + "to": -1 + }, + "type": "range" + } + ] + } + ] + } + ] }, "gridPos": { "h": 3, "w": 5, "x": 5, - "y": 1 + "y": 3 }, - "id": 208, + "id": 216, "options": { "colorMode": "value", "graphMode": "area", @@ -244,41 +363,69 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.3.4", + "pluginVersion": "8.1.8", "targets": [ { "datasource": "${DS_PROMETHEUS}", "exemplar": false, - "expr": "((count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\", antiRansomwareState !=\"\" , antiRansomwareState=~\"enabled|dry_run\"}) or vector (0)) / (count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\", antiRansomwareState !=\"\"}) or vector (1))) * 100", + "expr": "count(group by (datacenter, cluster, svm) ((svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", audit_protocol_enabled=\"false\"}) or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", scope=\"svm\", banner=\"\"} or (svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"} unless on (svm) security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm!=\"$Cluster\", svm=~\"$SVM\"}))) or vector(0)", "instant": true, "interval": "", - "legendFormat": "", + "legendFormat": "NonCompliantSvm", "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": false, + "expr": "count(svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\"}) or vector (1) ", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "TotalSvm", + "refId": "B" } ], - "title": "Volume Anti-ransomware Status %", + "title": "SVM Compliant %", "transformations": [ { "id": "calculateField", "options": { + "alias": "CompliantSvm", "binary": { - "left": "encrypted", + "left": "TotalSvm", + "operator": "-", + "reducer": "sum", + "right": "NonCompliantSvm" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "calculateField", + "options": { + "binary": { + "left": "CompliantSvm", "operator": "/", "reducer": "sum", - "right": "total" + "right": "TotalSvm" }, "mode": "binary", "reduce": { "reducer": "sum" }, - "replaceFields": true + "replaceFields": false } }, { "id": "calculateField", "options": { + "alias": "Compliant", "binary": { - "left": "encrypted / total", + "left": "CompliantSvm / TotalSvm", "operator": "*", "reducer": "sum", "right": "100" @@ -319,9 +466,9 @@ "h": 3, "w": 5, "x": 10, - "y": 1 + "y": 3 }, - "id": 210, + "id": 207, "options": { "colorMode": "value", "graphMode": "area", @@ -337,19 +484,29 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.3.4", + "pluginVersion": "8.1.8", "targets": [ { "datasource": "${DS_PROMETHEUS}", "exemplar": false, - "expr": "((count(svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", anti_ransomware_state!=\"\", anti_ransomware_state=~\"enabled|dry_run\"}) or vector (0))\n/\n(count(svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", anti_ransomware_state!=\"\"}) or vector (1))) * 100", + "expr": "(count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\", isEncrypted=\"true\"}) or vector (0))\n+\n(count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\", isHardwareEncrypted=\"true\"}) or vector (0) )", "instant": true, "interval": "", - "legendFormat": "", + "legendFormat": "encrypted", "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": false, + "expr": "(count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\"}) or vector (1) )", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "total", + "refId": "B" } ], - "title": "SVM Anti-ransomware Status %", + "title": "Volume Encryption %", "transformations": [ { "id": "calculateField", @@ -388,94 +545,38 @@ }, { "datasource": "${DS_PROMETHEUS}", - "description": "", - "gridPos": { - "h": 1, - "w": 9, - "x": 15, - "y": 1 - }, - "id": 201, - "options": { - "content": "", - "mode": "markdown" - }, - "pluginVersion": "8.3.4", - "title": "Cluster Authentication Methods", - "type": "text" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "", - "gridPos": { - "h": 1, - "w": 6, - "x": 15, - "y": 2 - }, - "id": 211, - "options": { - "content": "", - "mode": "markdown" - }, - "pluginVersion": "8.3.4", - "title": "Authentication Methods", - "type": "text" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "", - "gridPos": { - "h": 1, - "w": 3, - "x": 21, - "y": 2 - }, - "id": 202, - "options": { - "content": "", - "mode": "markdown" - }, - "pluginVersion": "8.3.4", - "title": "Certificates", - "type": "text" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "", + "description": "This panel requires a cluster with ONTAP 9.10+ and the Harvest REST collector", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, + "decimals": 0, "mappings": [], - "noValue": "0", "thresholds": { "mode": "absolute", "steps": [ { - "color": "blue", + "color": "green", "value": null } ] - }, - "unit": "locale" + } }, "overrides": [] }, "gridPos": { - "h": 5, - "w": 3, + "h": 3, + "w": 4.5, "x": 15, "y": 3 }, - "id": 158, - "links": [], + "id": 208, "options": { "colorMode": "value", - "graphMode": "none", + "graphMode": "area", "justifyMode": "auto", - "orientation": "vertical", + "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" @@ -486,37 +587,50 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.3.4", + "pluginVersion": "8.1.8", "targets": [ { + "datasource": "${DS_PROMETHEUS}", "exemplar": false, - "expr": "count(count by (datacenter, cluster)(security_account_samluser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} > 0)) or vector (0)", - "format": "table", - "hide": false, + "expr": "((count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\", antiRansomwareState !=\"\" , antiRansomwareState=~\"enabled|dry_run\"}) or vector (0)) / (count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\", antiRansomwareState !=\"\"}) or vector (1))) * 100", "instant": true, "interval": "", - "intervalFactor": 1, "legendFormat": "", "refId": "A" } ], - "title": "SAML", + "title": "Volume Anti-ransomware Status %", "transformations": [ { - "id": "merge", - "options": {} + "id": "calculateField", + "options": { + "binary": { + "left": "encrypted", + "operator": "/", + "reducer": "sum", + "right": "total" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": true + } }, { - "id": "organize", + "id": "calculateField", "options": { - "excludeByName": { - "Value #A": true + "binary": { + "left": "encrypted / total", + "operator": "*", + "reducer": "sum", + "right": "100" }, - "indexByName": {}, - "renameByName": { - "cluster": "Cluster", - "security_certificate_labels{certificateExpiryStatus=\"expiring\", certificateIssuerType=\"self_signed\", cluster=\"F8080-32-25\", datacenter=\"DC-02\", instance=\"localhost:12984\", job=\"prometheus14\", name=\"F8080-32-25_1673D3449EB39B95\", scope=\"cluster\", serial_number=\"1673D3449EB39B95\", type=\"server\", uuid=\"d7bb8e95-9840-11eb-814a-00a0986abd71\"}": "" - } + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": true } } ], @@ -530,34 +644,32 @@ "color": { "mode": "thresholds" }, + "decimals": 0, "mappings": [], - "noValue": "0", "thresholds": { "mode": "absolute", "steps": [ { - "color": "blue", + "color": "green", "value": null } ] - }, - "unit": "locale" + } }, "overrides": [] }, "gridPos": { - "h": 5, - "w": 3, - "x": 18, + "h": 3, + "w": 4.5, + "x": 19.5, "y": 3 }, - "id": 192, - "links": [], + "id": 210, "options": { "colorMode": "value", - "graphMode": "none", + "graphMode": "area", "justifyMode": "auto", - "orientation": "vertical", + "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" @@ -568,37 +680,50 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.3.4", + "pluginVersion": "8.1.8", "targets": [ { + "datasource": "${DS_PROMETHEUS}", "exemplar": false, - "expr": "(count(count by (datacenter, cluster) (security_account_activediruser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} > 0)) + count(count by (datacenter, cluster) (security_account_ldapuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} > 0))) or vector (0)", - "format": "table", - "hide": false, + "expr": "((count(svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", anti_ransomware_state!=\"\", anti_ransomware_state=~\"enabled|dry_run\"}) or vector (0))\n/\n(count(svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", anti_ransomware_state!=\"\"}) or vector (1))) * 100", "instant": true, "interval": "", - "intervalFactor": 1, "legendFormat": "", "refId": "A" } ], - "title": "AD/LDAP", + "title": "SVM Anti-ransomware Status %", "transformations": [ { - "id": "merge", - "options": {} - }, + "id": "calculateField", + "options": { + "binary": { + "left": "encrypted", + "operator": "/", + "reducer": "sum", + "right": "total" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": true + } + }, { - "id": "organize", + "id": "calculateField", "options": { - "excludeByName": { - "Value #A": true + "binary": { + "left": "encrypted / total", + "operator": "*", + "reducer": "sum", + "right": "100" }, - "indexByName": {}, - "renameByName": { - "cluster": "Cluster", - "security_certificate_labels{certificateExpiryStatus=\"expiring\", certificateIssuerType=\"self_signed\", cluster=\"F8080-32-25\", datacenter=\"DC-02\", instance=\"localhost:12984\", job=\"prometheus14\", name=\"F8080-32-25_1673D3449EB39B95\", scope=\"cluster\", serial_number=\"1673D3449EB39B95\", type=\"server\", uuid=\"d7bb8e95-9840-11eb-814a-00a0986abd71\"}": "" - } + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": true } } ], @@ -610,81 +735,351 @@ "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } }, + "decimals": 0, "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ + "unit": "locale" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Compliant" + }, + "properties": [ { - "color": "dark-yellow", - "value": null + "id": "mappings", + "value": [ + { + "options": { + "-Infinity": { + "color": "semi-dark-green", + "index": 1, + "text": "0" + }, + "Infinity": { + "color": "semi-dark-green", + "index": 0, + "text": "0" + } + }, + "type": "value" + }, + { + "options": { + "from": -9999, + "result": { + "color": "semi-dark-green", + "index": 2, + "text": "0" + }, + "to": -1 + }, + "type": "range" + }, + { + "options": { + "from": 0, + "result": { + "color": "semi-dark-green", + "index": 3 + }, + "to": 9999 + }, + "type": "range" + } + ] } ] }, + { + "matcher": { + "id": "byName", + "options": "Non Compliant" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "from": 0, + "result": { + "color": "semi-dark-yellow", + "index": 0 + }, + "to": 99999 + }, + "type": "range" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 13, + "w": 5, + "x": 0, + "y": 6 + }, + "id": 215, + "options": { + "displayLabels": [ + "value", + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "bottom", + "values": [ + "value" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": false, + "expr": "count (security_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}) or vector (0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Total", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": false, + "expr": "count(group by (datacenter, cluster)(support_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", asup_enabled=\"true\", asup_https_configured!=\"https\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", telnet_enabled=\"true\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", rsh_enabled=\"true\"} or group by (datacenter, cluster)(security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", hash_algorithm=\"md5\"}) > 0 or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"\"} or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"none\"} or group by (datacenter, cluster) (security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", locked=\"false\"}) > 0 or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"cluster\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$Cluster\"} or count by (datacenter, cluster) (ntpserver_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) < 1 or security_audit_destination_status{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", protocol!=\"tcp_encrypted\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", fips_enabled=\"false\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", type=\"admin\", ciphers=~\".*_cbc.*\"} or group by (datacenter, cluster) ((svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", audit_protocol_enabled=\"false\"}) or security_ssh_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"svm\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}))) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Non Compliant", + "refId": "B" + } + ], + "title": "Cluster Compliant", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Compliant", + "binary": { + "left": "Total", + "operator": "-", + "reducer": "sum", + "right": "Non Compliant" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Total": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "piechart" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "mappings": [], "unit": "locale" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Compliant" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "from": 0, + "result": { + "color": "semi-dark-green", + "index": 0 + }, + "to": 9999 + }, + "type": "range" + }, + { + "options": { + "from": -9999, + "result": { + "color": "semi-dark-green", + "index": 1, + "text": "0" + }, + "to": -1 + }, + "type": "range" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Not Compliant" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "from": 0, + "result": { + "color": "semi-dark-yellow", + "index": 0 + }, + "to": 99999 + }, + "type": "range" + } + ] + } + ] + } + ] }, "gridPos": { - "h": 5, - "w": 3, - "x": 21, - "y": 3 + "h": 13, + "w": 5, + "x": 5, + "y": 6 }, - "id": 193, - "links": [], + "id": 217, "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", + "displayLabels": [ + "value", + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "bottom", + "values": [ + "value" + ] + }, + "pieType": "donut", "reduceOptions": { "calcs": [ - "lastNotNull" + "last" ], "fields": "", "values": false }, - "text": {}, - "textMode": "auto" + "tooltip": { + "mode": "single" + } }, - "pluginVersion": "8.3.4", + "pluginVersion": "8.1.2", "targets": [ { "datasource": "${DS_PROMETHEUS}", "exemplar": false, - "expr": "count(security_certificate_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", certificateExpiryStatus=\"expiring\"})", - "format": "time_series", + "expr": "count(svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\"}) or vector(1)", + "instant": true, + "interval": "", + "legendFormat": "Total", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": false, + "expr": "count(group by (datacenter, cluster, svm) ((svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", audit_protocol_enabled=\"false\"}) or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", scope=\"svm\", banner=\"\"} or (svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"} unless on (svm) security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm!=\"$Cluster\", svm=~\"$SVM\"})))", "hide": false, "instant": true, "interval": "", - "legendFormat": "", + "legendFormat": "Not Compliant", "refId": "B" } ], - "title": "Expiring in < 60 days", + "title": "SVM Compliant", "transformations": [ { - "id": "merge", - "options": {} + "id": "calculateField", + "options": { + "alias": "Compliant", + "binary": { + "left": "Total", + "operator": "-", + "reducer": "sum", + "right": "Not Compliant" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } }, { "id": "organize", "options": { "excludeByName": { - "Value #A": true + "Time": true, + "Total": true }, "indexByName": {}, - "renameByName": { - "cluster": "Cluster", - "security_certificate_labels{certificateExpiryStatus=\"expiring\", certificateIssuerType=\"self_signed\", cluster=\"F8080-32-25\", datacenter=\"DC-02\", instance=\"localhost:12984\", job=\"prometheus14\", name=\"F8080-32-25_1673D3449EB39B95\", scope=\"cluster\", serial_number=\"1673D3449EB39B95\", type=\"server\", uuid=\"d7bb8e95-9840-11eb-814a-00a0986abd71\"}": "" - } + "renameByName": {} } } ], - "type": "stat" + "type": "piechart" }, { "datasource": "${DS_PROMETHEUS}", @@ -710,8 +1105,8 @@ "gridPos": { "h": 13, "w": 5, - "x": 0, - "y": 4 + "x": 10, + "y": 6 }, "id": 204, "options": { @@ -807,9 +1202,9 @@ }, "gridPos": { "h": 13, - "w": 5, - "x": 5, - "y": 4 + "w": 4.5, + "x": 15, + "y": 6 }, "id": 205, "options": { @@ -905,9 +1300,9 @@ }, "gridPos": { "h": 13, - "w": 5, - "x": 10, - "y": 4 + "w": 4.5, + "x": 19.5, + "y": 6 }, "id": 209, "options": { @@ -962,9 +1357,63 @@ { "datasource": "${DS_PROMETHEUS}", "description": "", - "fieldConfig": { - "defaults": { - "color": { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 201, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.8", + "title": "Cluster Authentication Methods", + "type": "text" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "gridPos": { + "h": 1, + "w": 16, + "x": 0, + "y": 20 + }, + "id": 211, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.8", + "title": "Authentication Methods", + "type": "text" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "gridPos": { + "h": 1, + "w": 8, + "x": 16, + "y": 20 + }, + "id": 202, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.8", + "title": "Certificates", + "type": "text" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { "mode": "thresholds" }, "mappings": [], @@ -984,11 +1433,11 @@ }, "gridPos": { "h": 5, - "w": 3, - "x": 15, - "y": 8 + "w": 4, + "x": 0, + "y": 21 }, - "id": 190, + "id": 158, "links": [], "options": { "colorMode": "value", @@ -1005,11 +1454,11 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.3.4", + "pluginVersion": "8.1.8", "targets": [ { "exemplar": false, - "expr": "count(count by (datacenter, cluster) (security_account_certificateuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} > 0)) or vector (0)", + "expr": "count(count by (datacenter, cluster)(security_account_samluser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} > 0)) or vector (0)", "format": "table", "hide": false, "instant": true, @@ -1019,7 +1468,7 @@ "refId": "A" } ], - "title": "Certificate", + "title": "SAML", "transformations": [ { "id": "merge", @@ -1066,11 +1515,11 @@ }, "gridPos": { "h": 5, - "w": 3, - "x": 18, - "y": 8 + "w": 4, + "x": 4, + "y": 21 }, - "id": 194, + "id": 192, "links": [], "options": { "colorMode": "value", @@ -1087,11 +1536,11 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.3.4", + "pluginVersion": "8.1.8", "targets": [ { "exemplar": false, - "expr": "count(count by (datacenter, cluster) (security_account_localuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} > 0)) or vector (0)", + "expr": "(count(count by (datacenter, cluster) (security_account_activediruser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} > 0)) + count(count by (datacenter, cluster) (security_account_ldapuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} > 0))) or vector (0)", "format": "table", "hide": false, "instant": true, @@ -1101,7 +1550,7 @@ "refId": "A" } ], - "title": "Local", + "title": "AD/LDAP", "transformations": [ { "id": "merge", @@ -1137,7 +1586,7 @@ "mode": "absolute", "steps": [ { - "color": "dark-red", + "color": "blue", "value": null } ] @@ -1148,11 +1597,11 @@ }, "gridPos": { "h": 5, - "w": 3, - "x": 21, - "y": 8 + "w": 4, + "x": 8, + "y": 21 }, - "id": 191, + "id": 190, "links": [], "options": { "colorMode": "value", @@ -1169,11 +1618,11 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.3.4", + "pluginVersion": "8.1.8", "targets": [ { "exemplar": false, - "expr": "count(security_certificate_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", certificateExpiryStatus=\"expired\"})", + "expr": "count(count by (datacenter, cluster) (security_account_certificateuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} > 0)) or vector (0)", "format": "table", "hide": false, "instant": true, @@ -1183,7 +1632,7 @@ "refId": "A" } ], - "title": "Expired", + "title": "Certificate", "transformations": [ { "id": "merge", @@ -1206,114 +1655,360 @@ "type": "stat" }, { - "collapsed": true, "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 17 + "h": 5, + "w": 4, + "x": 12, + "y": 21 }, - "id": 12, - "panels": [ + "id": 194, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.8", + "targets": [ { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "transparent", - "mode": "fixed" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } + "exemplar": false, + "expr": "count(count by (datacenter, cluster) (security_account_localuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} > 0)) or vector (0)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Local", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value #A": true }, - "overrides": [ + "indexByName": {}, + "renameByName": { + "cluster": "Cluster", + "security_certificate_labels{certificateExpiryStatus=\"expiring\", certificateIssuerType=\"self_signed\", cluster=\"F8080-32-25\", datacenter=\"DC-02\", instance=\"localhost:12984\", job=\"prometheus14\", name=\"F8080-32-25_1673D3449EB39B95\", scope=\"cluster\", serial_number=\"1673D3449EB39B95\", type=\"server\", uuid=\"d7bb8e95-9840-11eb-814a-00a0986abd71\"}": "" + } + } + } + ], + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ { - "matcher": { - "id": "byName", - "options": "Encryption Type" - }, - "properties": [ - { - "id": "custom.filterable", - "value": true - }, - { - "id": "mappings", - "value": [ - { - "options": { - "falsefalse": { - "index": 0, - "text": "None" - }, - "falsetrue": { - "index": 1, - "text": "Software" - }, - "truefalse": { - "index": 2, - "text": "Hardware" - }, - "truetrue": { - "index": 3, - "text": "Both" - } - }, - "type": "value" - }, - { - "options": { - "match": "empty", - "result": { - "index": 4, - "text": "None" - } - }, - "type": "special" - } - ] - } - ] + "color": "dark-yellow", + "value": null } ] }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 155, - "options": { - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.1.8", - "targets": [ - { - "exemplar": false, - "expr": "volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 16, + "y": 21 + }, + "id": 193, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": false, + "expr": "count(security_certificate_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", certificateExpiryStatus=\"expiring\"})", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "Expiring in < 60 days", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value #A": true + }, + "indexByName": {}, + "renameByName": { + "cluster": "Cluster", + "security_certificate_labels{certificateExpiryStatus=\"expiring\", certificateIssuerType=\"self_signed\", cluster=\"F8080-32-25\", datacenter=\"DC-02\", instance=\"localhost:12984\", job=\"prometheus14\", name=\"F8080-32-25_1673D3449EB39B95\", scope=\"cluster\", serial_number=\"1673D3449EB39B95\", type=\"server\", uuid=\"d7bb8e95-9840-11eb-814a-00a0986abd71\"}": "" + } + } + } + ], + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 20, + "y": 21 + }, + "id": 191, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "count(security_certificate_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", certificateExpiryStatus=\"expired\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Expired", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value #A": true + }, + "indexByName": {}, + "renameByName": { + "cluster": "Cluster", + "security_certificate_labels{certificateExpiryStatus=\"expiring\", certificateIssuerType=\"self_signed\", cluster=\"F8080-32-25\", datacenter=\"DC-02\", instance=\"localhost:12984\", job=\"prometheus14\", name=\"F8080-32-25_1673D3449EB39B95\", scope=\"cluster\", serial_number=\"1673D3449EB39B95\", type=\"server\", uuid=\"d7bb8e95-9840-11eb-814a-00a0986abd71\"}": "" + } + } + } + ], + "type": "stat" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 12, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "transparent", + "mode": "fixed" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Encryption Type" + }, + "properties": [ + { + "id": "custom.filterable", + "value": true + }, + { + "id": "mappings", + "value": [ + { + "options": { + "falsefalse": { + "index": 0, + "text": "None" + }, + "falsetrue": { + "index": 1, + "text": "Software" + }, + "truefalse": { + "index": 2, + "text": "Hardware" + }, + "truetrue": { + "index": 3, + "text": "Both" + } + }, + "type": "value" + }, + { + "options": { + "match": "empty", + "result": { + "index": 4, + "text": "None" + } + }, + "type": "special" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 155, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], "title": "Volume Encryption", "transformations": [ { @@ -1396,7 +2091,7 @@ "h": 1, "w": 24, "x": 0, - "y": 18 + "y": 27 }, "id": 16, "panels": [ @@ -1591,7 +2286,7 @@ "h": 1, "w": 24, "x": 0, - "y": 19 + "y": 28 }, "id": 196, "panels": [ @@ -1683,7 +2378,7 @@ "h": 7, "w": 24, "x": 0, - "y": 21 + "y": 6 }, "id": 183, "options": { @@ -1753,16 +2448,2287 @@ ], "title": "Volume Anti-ransomware Status", "type": "row" - } - ], - "refresh": "", - "schemaVersion": 30, - "style": "dark", - "tags": [ - "harvest", - "ontap", - "cdot", - "fsx" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 223, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "description": "❌ means this attribute is non-compliant", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "transparent", + "mode": "fixed" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Autosupport Https Transport" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 0, + "text": "❌ Disabled" + }, + "true": { + "index": 1, + "text": "Enabled" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 2, + "text": "❌ Disabled" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.width", + "value": 231 + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Default Admin User" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 0, + "text": "Disabled" + }, + "true": { + "index": 1, + "text": "❌ Enabled" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.filterable", + "value": true + }, + { + "id": "custom.width", + "value": 165 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "MD5 in use" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 1, + "text": "No" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "No" + } + }, + "type": "special" + }, + { + "options": { + "from": 1, + "result": { + "index": 2, + "text": "❌ Yes" + }, + "to": 99999999 + }, + "type": "range" + } + ] + }, + { + "id": "custom.width", + "value": 114 + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Remote Shell" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 0, + "text": "Disabled" + }, + "true": { + "index": 1, + "text": "❌ Enabled" + } + }, + "type": "value" + }, + { + "options": { + "match": "empty", + "result": { + "index": 2, + "text": "Disabled" + } + }, + "type": "special" + }, + { + "options": { + "match": "null", + "result": { + "index": 3, + "text": "Disabled" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.width", + "value": 122 + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Telnet" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 0, + "text": "Disabled" + }, + "true": { + "index": 1, + "text": "❌ Enabled" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 2, + "text": "Disabled" + } + }, + "type": "special" + }, + { + "options": { + "match": "empty", + "result": { + "index": 3, + "text": "Disabled" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.width", + "value": 99 + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Global FIPS" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 0, + "text": "❌ Disabled" + }, + "true": { + "index": 1, + "text": "Enabled" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 2, + "text": "❌ Disabled" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.width", + "value": 112 + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Insecure SSH Settings" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "true": { + "index": 0, + "text": "❌ Yes" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 1, + "text": "No" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.filterable", + "value": true + }, + { + "id": "custom.width", + "value": 186 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Login Banner" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "match": "empty", + "result": { + "index": 0, + "text": "❌ Disabled" + } + }, + "type": "special" + }, + { + "options": { + "match": "nan", + "result": { + "index": 1, + "text": "Enabled" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.width", + "value": 126 + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Network Time Protocol" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "❌ Not Configured" + }, + "1": { + "index": 1, + "text": "❌ 1 out of 3" + }, + "2": { + "index": 2, + "text": "❌ 2 out of 3" + } + }, + "type": "value" + }, + { + "options": { + "from": 3, + "result": { + "index": 3, + "text": "Configured" + }, + "to": 9999 + }, + "type": "range" + } + ] + }, + { + "id": "custom.width", + "value": 169 + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Local Users" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "Unconfigured" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "index": 1, + "text": "Configured" + }, + "to": 9999 + }, + "type": "range" + } + ] + }, + { + "id": "custom.width", + "value": 119 + }, + { + "id": "custom.filterable", + "value": true + }, + { + "id": "unit", + "value": "short" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Certificate Users" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "Unconfigured" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "index": 1, + "text": "Configured" + }, + "to": 9999 + }, + "type": "range" + } + ] + }, + { + "id": "custom.width", + "value": 159 + }, + { + "id": "custom.filterable", + "value": true + }, + { + "id": "unit", + "value": "short" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Saml Users" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "Unconfigured" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "index": 1, + "text": "Configured" + }, + "to": 9999 + }, + "type": "range" + } + ] + }, + { + "id": "custom.width", + "value": 121 + }, + { + "id": "custom.filterable", + "value": true + }, + { + "id": "unit", + "value": "short" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Ldap Users" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "Unconfigured" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "index": 1, + "text": "Configured" + }, + "to": 9999 + }, + "type": "range" + } + ] + }, + { + "id": "custom.width", + "value": 124 + }, + { + "id": "custom.filterable", + "value": true + }, + { + "id": "unit", + "value": "short" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Active Directory Users" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "Unconfigured" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "index": 1, + "text": "Configured" + }, + "to": 9999 + }, + "type": "range" + } + ] + }, + { + "id": "custom.filterable", + "value": true + }, + { + "id": "custom.width", + "value": 185 + }, + { + "id": "unit", + "value": "short" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Cluster Peering" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 1, + "text": "Encrypted" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "Not Peered" + } + }, + "type": "special" + }, + { + "options": { + "from": 1, + "result": { + "index": 2, + "text": "❌ Not Encrypted" + }, + "to": 9999999999 + }, + "type": "range" + } + ] + }, + { + "id": "custom.filterable", + "value": true + }, + { + "id": "custom.width", + "value": 135 + }, + { + "id": "unit", + "value": "short" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Cluster Certificate Validity" + }, + "properties": [ + { + "id": "custom.filterable", + "value": true + }, + { + "id": "mappings", + "value": [ + { + "options": { + "active": { + "index": 0, + "text": "Active" + }, + "expired": { + "index": 2, + "text": "❌ Expired" + }, + "expiring": { + "index": 1, + "text": "Active (Expiring < 60 days)" + }, + "unknown": { + "index": 3, + "text": "Unknown" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 4, + "text": "Unknown" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.width", + "value": 206 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Certificate Issuer Type" + }, + "properties": [ + { + "id": "custom.filterable", + "value": true + }, + { + "id": "mappings", + "value": [ + { + "options": { + "ca_signed": { + "index": 1, + "text": "CA-Signed" + }, + "self_signed": { + "index": 0, + "text": "Self-Signed" + }, + "unknown": { + "index": 2, + "text": "Unknown" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 3, + "text": "Unknown" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.width", + "value": 187 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Compliant" + }, + "properties": [ + { + "id": "custom.filterable", + "value": true + }, + { + "id": "mappings", + "value": [ + { + "options": { + "1": { + "index": 0, + "text": "❌ No" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 1, + "text": "Yes" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.width", + "value": 115 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Snapshot Policy" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "Enabled" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "index": 1, + "text": "❌ Disabled" + }, + "to": 9999 + }, + "type": "range" + } + ] + }, + { + "id": "custom.width", + "value": 135 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Snapshot Autodelete" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "No" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "index": 1, + "text": "❌ Yes" + }, + "to": 9999 + }, + "type": "range" + } + ] + }, + { + "id": "custom.width", + "value": 170 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ARW Protection for SVMs" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "Configured" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "index": 1, + "text": "❌ Not Configured" + }, + "to": 9999 + }, + "type": "range" + }, + { + "options": { + "match": "null", + "result": { + "index": 2, + "text": "❌ Not Configured" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.width", + "value": 195 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ARW Protection for Volumes" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "Learning Mode": { + "index": 3, + "text": "❌ Learning Mode" + }, + "Not Monitoring": { + "index": 1, + "text": "❌ Not Monitoring" + }, + "Switch to Active Mode": { + "index": 2, + "text": "❌ Switch to Active Mode" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "❌ Not Applicable" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.width", + "value": 218 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Notifications Configured" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "❌ Not Configured" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "index": 1, + "text": "Configured" + }, + "to": 9999 + }, + "type": "range" + }, + { + "options": { + "match": "null", + "result": { + "index": 2, + "text": "Not Applicable" + } + }, + "type": "special" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Automatic Updates Configured" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 0, + "text": "❌ Not Configured" + }, + "true": { + "index": 1, + "text": "Configured" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 2, + "text": "Not Applicable" + } + }, + "type": "special" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 219, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "support_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", asup_https_configured=\"https\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "exemplar": false, + "expr": "security_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + }, + { + "exemplar": false, + "expr": "security_account_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", methods=~\".*password.*\",role_name=\"admin\", user_name=\"admin\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "C" + }, + { + "exemplar": false, + "expr": "count by (datacenter,cluster,hash_algorithm)(security_account_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", hash_algorithm=\"md5\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "D" + }, + { + "exemplar": false, + "expr": "count by (datacenter, cluster, insecured)(svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", insecured=\"true\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "E" + }, + { + "exemplar": false, + "expr": "security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",scope=\"cluster\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$Cluster\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "F" + }, + { + "exemplar": false, + "expr": "count by (datacenter, cluster) (ntpserver_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "G" + }, + { + "exemplar": false, + "expr": "sum by (datacenter, cluster) (cluster_peer_non_encrypted{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "J" + }, + { + "exemplar": false, + "expr": "sum by (datacenter, cluster) (security_account_localuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "K" + }, + { + "exemplar": false, + "expr": "sum by (datacenter, cluster) (security_account_samluser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "I" + }, + { + "exemplar": false, + "expr": "sum by (datacenter, cluster) (security_account_activediruser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "L" + }, + { + "exemplar": false, + "expr": "sum by (datacenter, cluster) (security_account_ldapuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "M" + }, + { + "exemplar": false, + "expr": "sum by (datacenter, cluster) (security_account_certificateuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "N" + }, + { + "exemplar": false, + "expr": "security_certificate_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "O" + }, + { + "exemplar": false, + "expr": "group by (datacenter, cluster)(support_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", asup_enabled=\"true\", asup_https_configured!=\"https\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", telnet_enabled=\"true\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", rsh_enabled=\"true\"} or group by (datacenter, cluster)(security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", hash_algorithm=\"md5\"}) > 0 or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"\"} or cluster_peer_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", encryption_state=\"none\"} or group by (datacenter, cluster) (security_account_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", locked=\"false\"}) > 0 or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"cluster\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$Cluster\"} or count by (datacenter, cluster) (ntpserver_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) < 1 or security_audit_destination_status{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", protocol!=\"tcp_encrypted\"} or security_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", fips_enabled=\"false\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", type=\"admin\", ciphers=~\".*_cbc.*\"} or group by (datacenter, cluster) ((svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", audit_protocol_enabled=\"false\"}) or security_ssh_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", scope=\"svm\", banner=\"\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"} or sum by (datacenter, cluster)(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",snapshot_policy=\"none\"}) > 0 or sum by (datacenter, cluster)(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",snapshot_autodelete=\"true\"}) > 0 or sum by (datacenter, cluster)(svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",anti_ransomware_state=~\"|.*disabled\",type=\"data\"}) > 0 or volume_arw_status{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",ArwStatus!=\"Active Mode\"} * on (instance) group_left() metadata_collector_instances{datacenter=~\"$Datacenter\",collector=\"Rest\", object=\"Volume\"} or count by (datacenter, cluster)(ems_destination_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) > 0 or support_auto_update_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",auto_update_enabled=\"false\"}))", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "P" + }, + { + "exemplar": false, + "expr": "sum by (datacenter, cluster)(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",snapshot_policy=\"none\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "H" + }, + { + "exemplar": false, + "expr": "sum by (datacenter, cluster)(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",snapshot_autodelete=\"true\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "Q" + }, + { + "exemplar": false, + "expr": "sum by (datacenter, cluster)(svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",anti_ransomware_state=~\"|.*disabled\",type=\"data\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "R" + }, + { + "exemplar": false, + "expr": "volume_arw_status{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} * on (instance) group_left() metadata_collector_instances{datacenter=~\"$Datacenter\",collector=\"Rest\", object=\"Volume\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "S" + }, + { + "exemplar": false, + "expr": "count by (datacenter, cluster)(ems_destination_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "T" + }, + { + "exemplar": false, + "expr": "support_auto_update_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "U" + } + ], + "title": "Cluster Compliance", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "asup_enabled", + "cluster", + "fips_enabled", + "rsh_enabled", + "telnet_enabled", + "locked", + "Value #K", + "Value #I", + "Value #L", + "Value #M", + "Value #N", + "certificateExpiryStatus", + "certificateIssuerType", + "Value #P", + "Value #H", + "Value #Q", + "Value #R", + "Value #T", + "auto_update_enabled", + "ArwStatus" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Value #B": true, + "Value #D": false, + "Value #E": false, + "Value #G": false, + "Value #S": true, + "Value #T": false, + "__name__": true, + "__name__ 1": true, + "__name__ 2": true, + "datacenter": false, + "datacenter 1": true, + "datacenter 2": true, + "fips_enabled": false, + "hash_algorithm": false, + "instance": true, + "instance 1": true, + "instance 2": true, + "job": true, + "job 1": true, + "job 2": true, + "locked": false, + "methods": true + }, + "indexByName": { + "ArwStatus": 6, + "Value #H": 2, + "Value #I": 13, + "Value #K": 17, + "Value #L": 14, + "Value #M": 15, + "Value #N": 16, + "Value #P": 0, + "Value #Q": 3, + "Value #R": 4, + "Value #S": 5, + "asup_enabled": 10, + "certificateExpiryStatus": 7, + "certificateIssuerType": 18, + "cluster": 1, + "datacenter": 19, + "fips_enabled": 8, + "locked": 11, + "rsh_enabled": 12, + "telnet_enabled": 9 + }, + "renameByName": { + "ArwStatus": "ARW Protection for Volumes", + "Value #A": "Autosupport Https Transport", + "Value #C": "Default Admin User", + "Value #D": "MD5 in use", + "Value #G": "Network Time Protocol", + "Value #H": "Snapshot Policy", + "Value #I": "Saml Users", + "Value #J": "Cluster Peering", + "Value #K": "Local Users", + "Value #L": "Active Directory Users", + "Value #M": "Ldap Users", + "Value #N": "Certificate Users", + "Value #P": "Compliant", + "Value #Q": "Snapshot Autodelete", + "Value #R": "ARW Protection for SVMs", + "Value #S": "Volumes Monitored for ARW Protection", + "Value #T": "Notifications Configured", + "activediruser": "Active Directory Users", + "asupEnabled": "", + "asupHttpsConfigured": "", + "asup_enabled": "Autosupport Https Transport", + "auto_update_enabled": "Automatic Updates Configured", + "banner": "Login Banner", + "certificateExpiryStatus": "Cluster Certificate Validity", + "certificateIssuerType": "Certificate Issuer Type", + "certificateuser": "Certificate Users", + "cluster": "Cluster", + "encryption_state": "Cluster Peering", + "fips_enabled": "Global FIPS", + "insecured": "Insecure SSH Settings", + "ldapuser": "Ldap Users", + "localuser": "Local Users", + "locked": "Default Admin User", + "ntp": "Network Time Protocol", + "rsh_enabled": "Remote Shell", + "samluser": "Saml Users", + "telnet_enabled": "Telnet" + } + } + } + ], + "type": "table" + } + ], + "title": "Cluster Compliance", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 227, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "description": "❌ means this attribute is non-compliant", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "transparent", + "mode": "fixed" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster" + }, + "properties": [ + { + "id": "displayName", + "value": "Cluster" + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Login Banner" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "match": "empty", + "result": { + "index": 0, + "text": "❌ Disabled" + } + }, + "type": "special" + }, + { + "options": { + "match": "null", + "result": { + "index": 1, + "text": "❌ Disabled" + } + }, + "type": "special" + }, + { + "options": { + "match": "nan", + "result": { + "index": 2, + "text": "Enabled" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Audit Log" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 1, + "text": "❌ Disabled" + }, + "true": { + "index": 0, + "text": "Enabled" + } + }, + "type": "value" + }, + { + "options": { + "match": "empty", + "result": { + "index": 2, + "text": "N/A" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "LDAP Payload Signing" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "Disabled" + }, + "1": { + "index": 1, + "text": "Enabled" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.filterable", + "value": true + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Insecure SSH Settings" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "true": { + "index": 0, + "text": "❌ Yes" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 1, + "text": "No" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "NTML Authentication" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "lm_ntlm_ntlmv2_krb": { + "index": 0, + "text": "Enabled" + }, + "ntlm_ntlmv2_krb": { + "index": 1, + "text": "Enabled" + }, + "ntlmv2_krb": { + "index": 2, + "text": "Enabled" + } + }, + "type": "value" + }, + { + "options": { + "match": "nan", + "result": { + "index": 3, + "text": "❌ Disabled" + } + }, + "type": "special" + }, + { + "options": { + "match": "empty", + "result": { + "index": 4, + "text": "N/A" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "LDAP Encryption" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "index": 0, + "text": "Disabled" + }, + "1": { + "index": 1, + "text": "Enabled" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.filterable", + "value": true + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "SMB Encryption Enabled" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 1, + "text": "Disabled" + }, + "true": { + "index": 0, + "text": "Enabled" + } + }, + "type": "value" + }, + { + "options": { + "match": "empty", + "result": { + "index": 2, + "text": "N/A" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "SMB Signing Enabled" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 0, + "text": "Disabled" + }, + "true": { + "index": 1, + "text": "Enabled" + } + }, + "type": "value" + }, + { + "options": { + "match": "empty", + "result": { + "index": 2, + "text": "N/A" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kerberos V5" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 1, + "text": "Disabled" + }, + "true": { + "index": 0, + "text": "Enabled" + } + }, + "type": "value" + }, + { + "options": { + "match": "empty", + "result": { + "index": 2, + "text": "N/A" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CHAP Settings" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "pattern": ".*chap.*", + "result": { + "index": 0, + "text": "Enabled" + } + }, + "type": "regex" + }, + { + "options": { + "match": "nan", + "result": { + "index": 1, + "text": "Disabled" + } + }, + "type": "special" + }, + { + "options": { + "match": "empty", + "result": { + "index": 2, + "text": "N/A" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "NIS Authentication" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 1, + "text": "Disabled" + }, + "true": { + "index": 0, + "text": "❌ Enabled" + } + }, + "type": "value" + }, + { + "options": { + "match": "empty", + "result": { + "index": 2, + "text": "N/A" + } + }, + "type": "special" + } + ] + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Fpolicy Status Active" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 1, + "text": "Disabled" + }, + "true": { + "index": 0, + "text": "Enabled" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "SVM" + }, + "properties": [ + { + "id": "custom.width", + "value": 150 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Compliant" + }, + "properties": [ + { + "id": "custom.filterable", + "value": true + }, + { + "id": "mappings", + "value": [ + { + "options": { + "1": { + "index": 1, + "text": "❌ No" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "Yes" + } + }, + "type": "special" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 13, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 225, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "Compliant" + } + ] + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "exemplar": false, + "expr": "security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", scope=\"svm\", svm=~\"$SVM\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm!=\"$Cluster\", svm=~\"$SVM\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "C" + }, + { + "exemplar": false, + "expr": "count by (datacenter, cluster, insecured)(svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", insecured=\"true\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "E" + }, + { + "exemplar": false, + "expr": "svm_ldap_signed{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "G" + }, + { + "exemplar": false, + "expr": "svm_ldap_encrypted{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "I" + }, + { + "exemplar": false, + "expr": "group by (datacenter, cluster, svm) ((svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", cifs_protocol_enabled=\"true\"} or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", nfs_protocol_enabled=\"true\"} and svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", audit_protocol_enabled=\"false\"}) or svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", ciphers=~\".*_cbc.*\"} or security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", scope=\"svm\", banner=\"\"} or (svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"} unless on (svm) security_login_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm!=\"$Cluster\", svm=~\"$SVM\"}))", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "SVM Compliance", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "audit_protocol_enabled", + "cifs_ntlm_enabled", + "cluster", + "iscsi_authentication_type", + "nfs_kerberos_protocol_enabled", + "nis_authentication_enabled", + "smb_encryption_required", + "smb_signing_required", + "svm", + "banner", + "insecured", + "Value #G", + "Value #I", + "Value #B" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Value #B": false, + "Value #C": true, + "Value #D": false, + "Value #E": false, + "Value #G": false, + "__name__": true, + "__name__ 1": true, + "__name__ 2": true, + "audit_protocol_enabled": false, + "banner": false, + "cifs_ntlm_enabled": false, + "datacenter": true, + "datacenter 1": true, + "datacenter 2": true, + "fips_enabled": false, + "hash_algorithm": false, + "instance": true, + "instance 1": true, + "instance 2": true, + "iscsi_authentication_type": false, + "job": true, + "job 1": true, + "job 2": true, + "locked": true, + "methods": true, + "nfs_kerberos_protocol_enabled": false, + "smb_encryption_required": false, + "smb_signing_required": false + }, + "indexByName": { + "Value #B": 0, + "Value #G": 9, + "Value #I": 8, + "audit_protocol_enabled": 4, + "banner": 3, + "cifs_ntlm_enabled": 7, + "cluster": 1, + "insecured": 5, + "iscsi_authentication_type": 10, + "nfs_kerberos_protocol_enabled": 11, + "nis_authentication_enabled": 6, + "smb_encryption_required": 12, + "smb_signing_required": 13, + "svm": 2 + }, + "renameByName": { + "Value #A": "Autosupport Https Transport", + "Value #B": "Compliant", + "Value #D": "MD5 in use", + "Value #E": "", + "Value #G": "LDAP Payload Signing", + "Value #I": "LDAP Encryption", + "activediruser": "Active Directory Users", + "asupEnabled": "", + "asupHttpsConfigured": "", + "audit_protocol_enabled": "Audit Log", + "banner": "Login Banner", + "certificateuser": "Certificate Users", + "cifs_ntlm_enabled": "NTML Authentication", + "cluster": "", + "fips_enabled": "Global FIPS", + "fpolicy_enabled": "Fpolicy Status Active", + "insecured": "Insecure SSH Settings", + "iscsi_authentication_type": "CHAP Settings", + "ldapuser": "Ldap Users", + "localuser": "Local Users", + "nfs_kerberos_protocol_enabled": "Kerberos V5", + "nis_authentication_enabled": "NIS Authentication", + "nis_domain": "NIS Authentication", + "ntp": "Network Time Protocol", + "rsh_enabled": "Remote Shell", + "samluser": "Saml Users", + "smb_encryption_required": "SMB Encryption Enabled", + "smb_signing_required": "SMB Signing Enabled", + "svm": "SVM", + "telnet_enabled": "Telnet" + } + } + } + ], + "type": "table" + } + ], + "title": "SVM Compliance", + "type": "row" + } + ], + "refresh": "", + "schemaVersion": 30, + "style": "dark", + "tags": [ + "harvest", + "ontap", + "cdot", + "fsx" ], "templating": { "list": [ @@ -1789,7 +4755,7 @@ { "allValue": null, "current": { - "selected": false, + "selected": true, "text": [ "rest", "zapi" @@ -1825,7 +4791,7 @@ { "allValue": null, "current": { - "selected": false, + "selected": true, "text": [ "All" ], @@ -1859,7 +4825,7 @@ { "allValue": null, "current": { - "selected": false, + "selected": true, "text": [ "All" ], @@ -1868,8 +4834,8 @@ ] }, "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(svm_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"},svm)", - "description": null, + "definition": "label_values(svm_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",root_svm=\"No\"},svm)", + "description": "Displaying only the data SVMs and omitting root SVMs", "error": null, "hide": 0, "includeAll": true, @@ -1878,7 +4844,7 @@ "name": "SVM", "options": [], "query": { - "query": "label_values(svm_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"},svm)", + "query": "label_values(svm_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",root_svm=\"No\"},svm)", "refId": "StandardVariableQuery" }, "refresh": 2, @@ -1890,7 +4856,7 @@ ] }, "time": { - "from": "now-6h", + "from": "now-1m", "to": "now" }, "timepicker": { @@ -1909,5 +4875,5 @@ "timezone": "", "title": "ONTAP: Security", "uid": "", - "version": 3 + "version": 4 } diff --git a/grafana/dashboards/cmode/snapmirror.json b/grafana/dashboards/cmode/snapmirror.json index 42d6e4da0..b32419626 100644 --- a/grafana/dashboards/cmode/snapmirror.json +++ b/grafana/dashboards/cmode/snapmirror.json @@ -767,7 +767,6 @@ "cluster": false, "datacenter": true, "destination_node": true, - "destination_node_limit": true, "destination_volume": false, "destination_vserver": false, "instance": true, @@ -775,7 +774,6 @@ "relationship_type": true, "schedule": true, "source_node": true, - "source_node_limit": true, "source_volume": false, "source_vserver": false }, diff --git a/grafana/dashboards/cmode/volume.json b/grafana/dashboards/cmode/volume.json index 417488e94..cf815eb6a 100644 --- a/grafana/dashboards/cmode/volume.json +++ b/grafana/dashboards/cmode/volume.json @@ -71,7 +71,7 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "iteration": 1687429656268, + "iteration": 1691050019799, "links": [ { "asDropdown": true, @@ -269,6 +269,7 @@ "pluginVersion": "8.1.8", "targets": [ { + "exemplar": false, "expr": "sum(topk($TopResources, volume_total_ops{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}))", "interval": "", "legendFormat": "", @@ -549,7 +550,7 @@ ], "timeFrom": null, "timeShift": null, - "title": "Top $TopResources Volumes by IOPs", + "title": "Top $TopResources Volumes by Total IOPs", "transformations": [], "type": "timeseries" }, @@ -2279,8 +2280,8 @@ "overrides": [] }, "gridPos": { - "h": 8, - "w": 12, + "h": 9, + "w": 8, "x": 0, "y": 33 }, @@ -2375,9 +2376,9 @@ "overrides": [] }, "gridPos": { - "h": 8, - "w": 12, - "x": 12, + "h": 9, + "w": 8, + "x": 8, "y": 33 }, "id": 114, @@ -2415,6 +2416,97 @@ } ], "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "iops" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 33 + }, + "id": 115, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, volume_other_ops{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$TopVolumeOtherIOPS\"})", + "interval": "", + "legendFormat": "{{svm}} - {{volume}}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Top $TopResources Volumes by Other IOPs", + "transformations": [], + "type": "timeseries" } ], "title": "Volume WAFL Layer Drilldown", @@ -6846,6 +6938,29 @@ "skipUrlSync": false, "sort": 0, "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources, avg_over_time(volume_other_ops{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopVolumeOtherIOPS", + "options": [], + "query": { + "query": "query_result(topk($TopResources, avg_over_time(volume_other_ops{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*volume=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" } ] }, @@ -6869,5 +6984,5 @@ "timezone": "", "title": "ONTAP: Volume", "uid": "", - "version": 13 + "version": 14 } diff --git a/integration/Jenkinsfile b/integration/Jenkinsfile index 1050c6188..560020f23 100644 --- a/integration/Jenkinsfile +++ b/integration/Jenkinsfile @@ -18,7 +18,7 @@ pipeline { environment { BUILD_ID="dontKillMe" JENKINS_NODE_COOKIE="dontKillMe" - GO_VERSION = "1.20.6" + GO_VERSION = "1.20.7" } stages { diff --git a/integration/test/dashboard_json_test.go b/integration/test/dashboard_json_test.go index 46438acd4..2071772e1 100644 --- a/integration/test/dashboard_json_test.go +++ b/integration/test/dashboard_json_test.go @@ -36,6 +36,7 @@ var zapiCounterMap = map[string]struct{}{ "ontaps3_used_percent": {}, "ontaps3_services_labels": {}, "ontaps3_policy_labels": {}, + "volume_arw_status": {}, "volume_num_compress_fail": {}, "volume_num_compress_attempts": {}, } @@ -51,6 +52,7 @@ var excludeCounters = []string{ "cifs_session", "cluster_peer", "efficiency_savings", + "ems_destination_labels", "ems_events", "external_service_op_num_", "external_service_op_request_", @@ -80,6 +82,7 @@ var excludeCounters = []string{ "security_login", "smb2_", "snapmirror_", + "support_auto_update_labels", "svm_cifs_", "svm_ldap", "svm_nfs_latency_hist_bucket", diff --git a/jenkins/artifacts/jenkinsfile b/jenkins/artifacts/jenkinsfile index 557d85d59..b21e935c8 100644 --- a/jenkins/artifacts/jenkinsfile +++ b/jenkins/artifacts/jenkinsfile @@ -37,7 +37,7 @@ pipeline { jfrogImagePrefix = "netappdownloads.jfrog.io/oss-docker-harvest-production/harvest" jfrogRepo = "netappdownloads.jfrog.io" COMMIT_ID = sh(returnStdout: true, script: 'git rev-parse HEAD') - GO_VERSION = "1.20.6" + GO_VERSION = "1.20.7" } stages { diff --git a/vendor/github.com/shirou/gopsutil/v3/process/process_darwin.go b/vendor/github.com/shirou/gopsutil/v3/process/process_darwin.go index 55c31962a..176661cbd 100644 --- a/vendor/github.com/shirou/gopsutil/v3/process/process_darwin.go +++ b/vendor/github.com/shirou/gopsutil/v3/process/process_darwin.go @@ -82,8 +82,6 @@ func (p *Process) NameWithContext(ctx context.Context) (string, error) { extendedName := filepath.Base(cmdName) if strings.HasPrefix(extendedName, p.name) { name = extendedName - } else { - name = cmdName } } } diff --git a/vendor/github.com/shirou/gopsutil/v3/process/process_freebsd.go b/vendor/github.com/shirou/gopsutil/v3/process/process_freebsd.go index a123ccf9b..85134b7ee 100644 --- a/vendor/github.com/shirou/gopsutil/v3/process/process_freebsd.go +++ b/vendor/github.com/shirou/gopsutil/v3/process/process_freebsd.go @@ -55,8 +55,6 @@ func (p *Process) NameWithContext(ctx context.Context) (string, error) { extendedName := filepath.Base(cmdlineSlice[0]) if strings.HasPrefix(extendedName, p.name) { name = extendedName - } else { - name = cmdlineSlice[0] } } } diff --git a/vendor/github.com/shirou/gopsutil/v3/process/process_linux.go b/vendor/github.com/shirou/gopsutil/v3/process/process_linux.go index 29c447390..37cb7ca44 100644 --- a/vendor/github.com/shirou/gopsutil/v3/process/process_linux.go +++ b/vendor/github.com/shirou/gopsutil/v3/process/process_linux.go @@ -845,8 +845,6 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error { extendedName := filepath.Base(cmdlineSlice[0]) if strings.HasPrefix(extendedName, p.name) { p.name = extendedName - } else { - p.name = cmdlineSlice[0] } } } diff --git a/vendor/github.com/shirou/gopsutil/v3/process/process_openbsd.go b/vendor/github.com/shirou/gopsutil/v3/process/process_openbsd.go index cbb1a77f6..a58c5eb11 100644 --- a/vendor/github.com/shirou/gopsutil/v3/process/process_openbsd.go +++ b/vendor/github.com/shirou/gopsutil/v3/process/process_openbsd.go @@ -60,8 +60,6 @@ func (p *Process) NameWithContext(ctx context.Context) (string, error) { extendedName := filepath.Base(cmdlineSlice[0]) if strings.HasPrefix(extendedName, p.name) { name = extendedName - } else { - name = cmdlineSlice[0] } } } diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 0c4d14929..8f775fafa 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -624,7 +624,7 @@ ccflags="$@" $2 ~ /^MEM/ || $2 ~ /^WG/ || $2 ~ /^FIB_RULE_/ || - $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)} + $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE|IOMIN$|IOOPT$|ALIGNOFF$|DISCARD|ROTATIONAL$|ZEROOUT$|GETDISKSEQ$)/ {printf("\t%s = C.%s\n", $2, $2)} $2 ~ /^__WCOREFLAG$/ {next} $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} diff --git a/vendor/golang.org/x/sys/unix/mmap_nomremap.go b/vendor/golang.org/x/sys/unix/mmap_nomremap.go new file mode 100644 index 000000000..ca0513632 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mmap_nomremap.go @@ -0,0 +1,14 @@ +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris +// +build aix darwin dragonfly freebsd openbsd solaris + +package unix + +var mapper = &mmapper{ + active: make(map[*byte][]byte), + mmap: mmap, + munmap: munmap, +} diff --git a/vendor/golang.org/x/sys/unix/mremap.go b/vendor/golang.org/x/sys/unix/mremap.go index 86213c05d..fa93d0aa9 100644 --- a/vendor/golang.org/x/sys/unix/mremap.go +++ b/vendor/golang.org/x/sys/unix/mremap.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux -// +build linux +//go:build linux || netbsd +// +build linux netbsd package unix @@ -14,8 +14,17 @@ type mremapMmapper struct { mremap func(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error) } +var mapper = &mremapMmapper{ + mmapper: mmapper{ + active: make(map[*byte][]byte), + mmap: mmap, + munmap: munmap, + }, + mremap: mremap, +} + func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) { - if newLength <= 0 || len(oldData) == 0 || len(oldData) != cap(oldData) || flags&MREMAP_FIXED != 0 { + if newLength <= 0 || len(oldData) == 0 || len(oldData) != cap(oldData) || flags&mremapFixed != 0 { return nil, EINVAL } @@ -32,9 +41,13 @@ func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data [ } bNew := unsafe.Slice((*byte)(unsafe.Pointer(newAddr)), newLength) pNew := &bNew[cap(bNew)-1] - if flags&MREMAP_DONTUNMAP == 0 { + if flags&mremapDontunmap == 0 { delete(m.active, pOld) } m.active[pNew] = bNew return bNew, nil } + +func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) { + return mapper.Mremap(oldData, newLength, flags) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go index c406ae00f..9a6e5acac 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix.go @@ -535,21 +535,6 @@ func Fsync(fd int) error { //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = nsendmsg //sys munmap(addr uintptr, length uintptr) (err error) - -var mapper = &mmapper{ - active: make(map[*byte][]byte), - mmap: mmap, - munmap: munmap, -} - -func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { - return mapper.Mmap(fd, offset, length, prot, flags) -} - -func Munmap(b []byte) (err error) { - return mapper.Munmap(b) -} - //sys Madvise(b []byte, advice int) (err error) //sys Mprotect(b []byte, prot int) (err error) //sys Mlock(b []byte) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go index 7705c3270..4217de518 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -601,20 +601,6 @@ func Poll(fds []PollFd, timeout int) (n int, err error) { // Gethostuuid(uuid *byte, timeout *Timespec) (err error) // Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error) -var mapper = &mmapper{ - active: make(map[*byte][]byte), - mmap: mmap, - munmap: munmap, -} - -func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { - return mapper.Mmap(fd, offset, length, prot, flags) -} - -func Munmap(b []byte) (err error) { - return mapper.Munmap(b) -} - //sys Madvise(b []byte, behav int) (err error) //sys Mlock(b []byte) (err error) //sys Mlockall(flags int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 206921504..135cc3cd7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -510,30 +510,36 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { return nil, err } - // Find size. - n := uintptr(0) - if err := sysctl(mib, nil, &n, nil, 0); err != nil { - return nil, err - } - if n == 0 { - return nil, nil - } - if n%SizeofKinfoProc != 0 { - return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc) - } + for { + // Find size. + n := uintptr(0) + if err := sysctl(mib, nil, &n, nil, 0); err != nil { + return nil, err + } + if n == 0 { + return nil, nil + } + if n%SizeofKinfoProc != 0 { + return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc) + } - // Read into buffer of that size. - buf := make([]KinfoProc, n/SizeofKinfoProc) - if err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil { - return nil, err - } - if n%SizeofKinfoProc != 0 { - return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc) - } + // Read into buffer of that size. + buf := make([]KinfoProc, n/SizeofKinfoProc) + if err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil { + if err == ENOMEM { + // Process table grew. Try again. + continue + } + return nil, err + } + if n%SizeofKinfoProc != 0 { + return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc) + } - // The actual call may return less than the original reported required - // size so ensure we deal with that. - return buf[:n/SizeofKinfoProc], nil + // The actual call may return less than the original reported required + // size so ensure we deal with that. + return buf[:n/SizeofKinfoProc], nil + } } //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 39de5f143..a730878e4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1885,7 +1885,7 @@ func Getpgrp() (pid int) { //sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT //sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) -//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6 +//sys pselect6(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *sigset_argpack) (n int, err error) //sys read(fd int, p []byte) (n int, err error) //sys Removexattr(path string, attr string) (err error) //sys Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) @@ -2125,28 +2125,6 @@ func writevRacedetect(iovecs []Iovec, n int) { // mmap varies by architecture; see syscall_linux_*.go. //sys munmap(addr uintptr, length uintptr) (err error) //sys mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error) - -var mapper = &mremapMmapper{ - mmapper: mmapper{ - active: make(map[*byte][]byte), - mmap: mmap, - munmap: munmap, - }, - mremap: mremap, -} - -func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { - return mapper.Mmap(fd, offset, length, prot, flags) -} - -func Munmap(b []byte) (err error) { - return mapper.Munmap(b) -} - -func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) { - return mapper.Mremap(oldData, newLength, flags) -} - //sys Madvise(b []byte, advice int) (err error) //sys Mprotect(b []byte, prot int) (err error) //sys Mlock(b []byte) (err error) @@ -2155,6 +2133,12 @@ func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) { //sys Munlock(b []byte) (err error) //sys Munlockall() (err error) +const ( + mremapFixed = MREMAP_FIXED + mremapDontunmap = MREMAP_DONTUNMAP + mremapMaymove = MREMAP_MAYMOVE +) + // Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd, // using the specified flags. func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { @@ -2454,6 +2438,39 @@ func Getresgid() (rgid, egid, sgid int) { return int(r), int(e), int(s) } +// Pselect is a wrapper around the Linux pselect6 system call. +// This version does not modify the timeout argument. +func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + // Per https://man7.org/linux/man-pages/man2/select.2.html#NOTES, + // The Linux pselect6() system call modifies its timeout argument. + // [Not modifying the argument] is the behavior required by POSIX.1-2001. + var mutableTimeout *Timespec + if timeout != nil { + mutableTimeout = new(Timespec) + *mutableTimeout = *timeout + } + + // The final argument of the pselect6() system call is not a + // sigset_t * pointer, but is instead a structure + var kernelMask *sigset_argpack + if sigmask != nil { + wordBits := 32 << (^uintptr(0) >> 63) // see math.intSize + + // A sigset stores one bit per signal, + // offset by 1 (because signal 0 does not exist). + // So the number of words needed is ⌈__C_NSIG - 1 / wordBits⌉. + sigsetWords := (_C__NSIG - 1 + wordBits - 1) / (wordBits) + + sigsetBytes := uintptr(sigsetWords * (wordBits / 8)) + kernelMask = &sigset_argpack{ + ss: sigmask, + ssLen: sigsetBytes, + } + } + + return pselect6(nfd, r, w, e, mutableTimeout, kernelMask) +} + /* * Unimplemented */ diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go index 5b21fcfd7..70601ce36 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -40,7 +40,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err if timeout != nil { ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} } - return Pselect(nfd, r, w, e, ts, nil) + return pselect6(nfd, r, w, e, ts, nil) } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index a81f5742b..f5266689a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -33,7 +33,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err if timeout != nil { ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} } - return Pselect(nfd, r, w, e, ts, nil) + return pselect6(nfd, r, w, e, ts, nil) } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go index 69d2d7c3d..f6ab02ec1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go @@ -28,7 +28,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err if timeout != nil { ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} } - return Pselect(nfd, r, w, e, ts, nil) + return pselect6(nfd, r, w, e, ts, nil) } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go index 76d564095..93fe59d25 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -31,7 +31,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err if timeout != nil { ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} } - return Pselect(nfd, r, w, e, ts, nil) + return pselect6(nfd, r, w, e, ts, nil) } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index 35851ef70..5e6ceee12 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -32,7 +32,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err if timeout != nil { ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} } - return Pselect(nfd, r, w, e, ts, nil) + return pselect6(nfd, r, w, e, ts, nil) } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) @@ -177,3 +177,14 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } + +//sys riscvHWProbe(pairs []RISCVHWProbePairs, cpuCount uintptr, cpus *CPUSet, flags uint) (err error) + +func RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error) { + var setSize uintptr + + if set != nil { + setSize = uintptr(unsafe.Sizeof(*set)) + } + return riscvHWProbe(pairs, setSize, set, flags) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go index 018d7d478..ddd1ac853 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -360,6 +360,18 @@ func Statvfs(path string, buf *Statvfs_t) (err error) { //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) +const ( + mremapFixed = MAP_FIXED + mremapDontunmap = 0 + mremapMaymove = 0 +) + +//sys mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) = SYS_MREMAP + +func mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (uintptr, error) { + return mremapNetBSD(oldaddr, oldlength, newaddr, newlength, flags) +} + /* * Unimplemented */ @@ -564,7 +576,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) { // mq_timedreceive // mq_timedsend // mq_unlink -// mremap // msgget // msgrcv // msgsnd diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index b600a289d..72d23575f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -716,20 +716,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { return } -var mapper = &mmapper{ - active: make(map[*byte][]byte), - mmap: mmap, - munmap: munmap, -} - -func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { - return mapper.Mmap(fd, offset, length, prot, flags) -} - -func Munmap(b []byte) (err error) { - return mapper.Munmap(b) -} - // Event Ports type fileObjCookie struct { diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 8e48c29ec..8bb30e7ce 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -147,6 +147,14 @@ func (m *mmapper) Munmap(data []byte) (err error) { return nil } +func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + return mapper.Mmap(fd, offset, length, prot, flags) +} + +func Munmap(b []byte) (err error) { + return mapper.Munmap(b) +} + func Read(fd int, p []byte) (n int, err error) { n, err = read(fd, p) if raceenabled { diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go index d3d49ec3e..44e72edb4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go @@ -285,25 +285,11 @@ func Close(fd int) (err error) { return } -var mapper = &mmapper{ - active: make(map[*byte][]byte), - mmap: mmap, - munmap: munmap, -} - // Dummy function: there are no semantics for Madvise on z/OS func Madvise(b []byte, advice int) (err error) { return } -func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { - return mapper.Mmap(fd, offset, length, prot, flags) -} - -func Munmap(b []byte) (err error) { - return mapper.Munmap(b) -} - //sys Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A //sysnb Getegid() (egid int) //sysnb Geteuid() (uid int) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index a46df0f1e..cfb143001 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x127a BLKBSZGET = 0x80041270 BLKBSZSET = 0x40041271 + BLKDISCARD = 0x1277 + BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 + BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80041272 + BLKIOMIN = 0x1278 + BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d + BLKROTATIONAL = 0x127e BLKRRPART = 0x125f + BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 + BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 6cd4a3ea9..df64f2d59 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x127a BLKBSZGET = 0x80081270 BLKBSZSET = 0x40081271 + BLKDISCARD = 0x1277 + BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 + BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 + BLKIOMIN = 0x1278 + BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d + BLKROTATIONAL = 0x127e BLKRRPART = 0x125f + BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 + BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index c7ebee24d..3025cd5b2 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x127a BLKBSZGET = 0x80041270 BLKBSZSET = 0x40041271 + BLKDISCARD = 0x1277 + BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 + BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80041272 + BLKIOMIN = 0x1278 + BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d + BLKROTATIONAL = 0x127e BLKRRPART = 0x125f + BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 + BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 12a9a1389..09e1ffbef 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x127a BLKBSZGET = 0x80081270 BLKBSZSET = 0x40081271 + BLKDISCARD = 0x1277 + BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 + BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 + BLKIOMIN = 0x1278 + BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d + BLKROTATIONAL = 0x127e BLKRRPART = 0x125f + BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 + BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index f26a164f4..a45723540 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x127a BLKBSZGET = 0x80081270 BLKBSZSET = 0x40081271 + BLKDISCARD = 0x1277 + BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 + BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 + BLKIOMIN = 0x1278 + BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d + BLKROTATIONAL = 0x127e BLKRRPART = 0x125f + BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 + BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 890bc3c9b..fee7dfb81 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40041270 BLKBSZSET = 0x80041271 + BLKDISCARD = 0x20001277 + BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 + BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40041272 + BLKIOMIN = 0x20001278 + BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d + BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f + BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 + BLKZEROOUT = 0x2000127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 549f26ac6..a5b2373ae 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40081270 BLKBSZSET = 0x80081271 + BLKDISCARD = 0x20001277 + BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 + BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40081272 + BLKIOMIN = 0x20001278 + BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d + BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f + BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 + BLKZEROOUT = 0x2000127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index e0365e32c..5dde82c98 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40081270 BLKBSZSET = 0x80081271 + BLKDISCARD = 0x20001277 + BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 + BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40081272 + BLKIOMIN = 0x20001278 + BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d + BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f + BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 + BLKZEROOUT = 0x2000127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index fdccce15c..2e80ea6b3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40041270 BLKBSZSET = 0x80041271 + BLKDISCARD = 0x20001277 + BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 + BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40041272 + BLKIOMIN = 0x20001278 + BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d + BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f + BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 + BLKZEROOUT = 0x2000127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index b2205c83f..a65dcd7cb 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -27,22 +27,31 @@ const ( B57600 = 0x10 B576000 = 0x15 B921600 = 0x16 + BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40041270 BLKBSZSET = 0x80041271 + BLKDISCARD = 0x20001277 + BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 + BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40041272 + BLKIOMIN = 0x20001278 + BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d + BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f + BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 + BLKZEROOUT = 0x2000127f BOTHER = 0x1f BS1 = 0x8000 BSDLY = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 81aa5ad0f..cbd34e3d8 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -27,22 +27,31 @@ const ( B57600 = 0x10 B576000 = 0x15 B921600 = 0x16 + BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40081270 BLKBSZSET = 0x80081271 + BLKDISCARD = 0x20001277 + BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 + BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40081272 + BLKIOMIN = 0x20001278 + BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d + BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f + BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 + BLKZEROOUT = 0x2000127f BOTHER = 0x1f BS1 = 0x8000 BSDLY = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 76807a1fd..e4afa7a31 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -27,22 +27,31 @@ const ( B57600 = 0x10 B576000 = 0x15 B921600 = 0x16 + BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40081270 BLKBSZSET = 0x80081271 + BLKDISCARD = 0x20001277 + BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 + BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40081272 + BLKIOMIN = 0x20001278 + BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d + BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f + BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 + BLKZEROOUT = 0x2000127f BOTHER = 0x1f BS1 = 0x8000 BSDLY = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index d4a5ab9e4..44f45a039 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x127a BLKBSZGET = 0x80081270 BLKBSZSET = 0x40081271 + BLKDISCARD = 0x1277 + BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 + BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 + BLKIOMIN = 0x1278 + BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d + BLKROTATIONAL = 0x127e BLKRRPART = 0x125f + BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 + BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 66e65db95..74733e260 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -27,22 +27,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x127a BLKBSZGET = 0x80081270 BLKBSZSET = 0x40081271 + BLKDISCARD = 0x1277 + BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 + BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 + BLKIOMIN = 0x1278 + BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d + BLKROTATIONAL = 0x127e BLKRRPART = 0x125f + BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 + BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index 48984202c..f5f3934b1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -30,22 +30,31 @@ const ( B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 + BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40081270 BLKBSZSET = 0x80081271 + BLKDISCARD = 0x20001277 + BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 + BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40081272 + BLKIOMIN = 0x20001278 + BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d + BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f + BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 + BLKZEROOUT = 0x2000127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 7ceec233f..a07321bed 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -1356,7 +1356,7 @@ func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) ( // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { +func pselect6(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *sigset_argpack) (n int, err error) { r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) n = int(r0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go index 0b2923958..0ab4f2ed7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go @@ -531,3 +531,19 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func riscvHWProbe(pairs []RISCVHWProbePairs, cpuCount uintptr, cpus *CPUSet, flags uint) (err error) { + var _p0 unsafe.Pointer + if len(pairs) > 0 { + _p0 = unsafe.Pointer(&pairs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_RISCV_HWPROBE, uintptr(_p0), uintptr(len(pairs)), uintptr(cpuCount), uintptr(unsafe.Pointer(cpus)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index cdb2af5ae..35f499b32 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -1858,3 +1858,14 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index 9d25f76b0..3cda65b0d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -1858,3 +1858,14 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index d3f803516..1e1fea902 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -1858,3 +1858,14 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go index 887188a52..3b77da110 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go @@ -1858,3 +1858,14 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 3e594a8c0..ef285c567 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -251,6 +251,8 @@ const ( SYS_ACCEPT4 = 242 SYS_RECVMMSG = 243 SYS_ARCH_SPECIFIC_SYSCALL = 244 + SYS_RISCV_HWPROBE = 258 + SYS_RISCV_FLUSH_ICACHE = 259 SYS_WAIT4 = 260 SYS_PRLIMIT64 = 261 SYS_FANOTIFY_INIT = 262 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 02e2462c8..26ef52aaf 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -866,6 +866,11 @@ const ( POLLNVAL = 0x20 ) +type sigset_argpack struct { + ss *Sigset_t + ssLen uintptr +} + type SignalfdSiginfo struct { Signo uint32 Errno int32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 9ea54b7b8..83c69c119 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -718,3 +718,26 @@ type SysvShmDesc struct { _ uint64 _ uint64 } + +type RISCVHWProbePairs struct { + Key int64 + Value uint64 +} + +const ( + RISCV_HWPROBE_KEY_MVENDORID = 0x0 + RISCV_HWPROBE_KEY_MARCHID = 0x1 + RISCV_HWPROBE_KEY_MIMPID = 0x2 + RISCV_HWPROBE_KEY_BASE_BEHAVIOR = 0x3 + RISCV_HWPROBE_BASE_BEHAVIOR_IMA = 0x1 + RISCV_HWPROBE_KEY_IMA_EXT_0 = 0x4 + RISCV_HWPROBE_IMA_FD = 0x1 + RISCV_HWPROBE_IMA_C = 0x2 + RISCV_HWPROBE_KEY_CPUPERF_0 = 0x5 + RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0x0 + RISCV_HWPROBE_MISALIGNED_EMULATED = 0x1 + RISCV_HWPROBE_MISALIGNED_SLOW = 0x2 + RISCV_HWPROBE_MISALIGNED_FAST = 0x3 + RISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4 + RISCV_HWPROBE_MISALIGNED_MASK = 0x7 +) diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 964590075..373d16388 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -135,14 +135,14 @@ func Getpagesize() int { return 4096 } // NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention. // This is useful when interoperating with Windows code requiring callbacks. -// The argument is expected to be a function with with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr. +// The argument is expected to be a function with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr. func NewCallback(fn interface{}) uintptr { return syscall.NewCallback(fn) } // NewCallbackCDecl converts a Go function to a function pointer conforming to the cdecl calling convention. // This is useful when interoperating with Windows code requiring callbacks. -// The argument is expected to be a function with with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr. +// The argument is expected to be a function with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr. func NewCallbackCDecl(fn interface{}) uintptr { return syscall.NewCallbackCDecl(fn) } diff --git a/vendor/golang.org/x/text/language/match.go b/vendor/golang.org/x/text/language/match.go index ee45f4947..1153baf29 100644 --- a/vendor/golang.org/x/text/language/match.go +++ b/vendor/golang.org/x/text/language/match.go @@ -434,7 +434,7 @@ func newMatcher(supported []Tag, options []MatchOption) *matcher { // (their canonicalization simply substitutes a different language code, but // nothing else), the match confidence is Exact, otherwise it is High. for i, lm := range language.AliasMap { - // If deprecated codes match and there is no fiddling with the script or + // If deprecated codes match and there is no fiddling with the script // or region, we consider it an exact match. conf := Exact if language.AliasTypes[i] != language.Macro { diff --git a/vendor/modules.txt b/vendor/modules.txt index d7185155a..2d0d5086e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -62,7 +62,7 @@ github.com/rs/zerolog github.com/rs/zerolog/internal/cbor github.com/rs/zerolog/internal/json github.com/rs/zerolog/log -# github.com/shirou/gopsutil/v3 v3.23.6 +# github.com/shirou/gopsutil/v3 v3.23.7 ## explicit; go 1.15 github.com/shirou/gopsutil/v3/common github.com/shirou/gopsutil/v3/cpu @@ -104,16 +104,16 @@ github.com/yusufpapurcu/wmi # github.com/zekroTJA/timedmap v1.5.1 ## explicit; go 1.13 github.com/zekroTJA/timedmap -# golang.org/x/sys v0.10.0 +# golang.org/x/sys v0.11.0 ## explicit; go 1.17 golang.org/x/sys/internal/unsafeheader golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/term v0.10.0 +# golang.org/x/term v0.11.0 ## explicit; go 1.17 golang.org/x/term -# golang.org/x/text v0.11.0 +# golang.org/x/text v0.12.0 ## explicit; go 1.17 golang.org/x/text/cases golang.org/x/text/internal