diff --git a/cmd/poller/collector/helpers.go b/cmd/poller/collector/helpers.go index e762e6282..593c7e4fb 100644 --- a/cmd/poller/collector/helpers.go +++ b/cmd/poller/collector/helpers.go @@ -210,7 +210,7 @@ func (c *AbstractCollector) findBestFit(homePath string, confPath string, name s // get closest index idx := getClosestIndex(versions, ontapVersion) if idx >= 0 && idx < len(versions) { - selectedVersion = versions[idx].String() + selectedVersion = versions[idx].Original() } return filepath.Join(pathPrefix, selectedVersion), nil diff --git a/cmd/poller/collector/helpers_test.go b/cmd/poller/collector/helpers_test.go index 2fe7a2100..5b88018cd 100644 --- a/cmd/poller/collector/helpers_test.go +++ b/cmd/poller/collector/helpers_test.go @@ -4,6 +4,8 @@ import ( "github.com/netapp/harvest/v2/assert" "github.com/netapp/harvest/v2/pkg/conf" "github.com/netapp/harvest/v2/third_party/go-version" + "log/slog" + "path/filepath" "sort" "testing" ) @@ -119,3 +121,15 @@ func TestParseTemplateRef(t *testing.T) { }) } } + +func Test_findBestFit_LeadingZeroVersion(t *testing.T) { + repoRoot := "../../.." + c := &AbstractCollector{ + Name: "EseriesPerf", + Logger: slog.Default(), + } + + got, err := c.findBestFit(repoRoot, "conf", "ssd_cache.yaml", "", buildVersion("12.00.0")) + assert.Nil(t, err) + assert.Equal(t, filepath.Base(got), "12.00.0") +} diff --git a/cmd/tools/grafana/dashboard_test.go b/cmd/tools/grafana/dashboard_test.go index a84f5d606..934d43449 100644 --- a/cmd/tools/grafana/dashboard_test.go +++ b/cmd/tools/grafana/dashboard_test.go @@ -1067,6 +1067,7 @@ func TestOnlyHighlightsExpanded(t *testing.T) { "cmode/switch.json": 2, "cmode/workload.json": 2, "storagegrid/fabricpool.json": 2, + "eseries/ssd_cache.json": 2, } // count the number of expanded sections in the dashboard and ensure num expanded = 1 VisitDashboards( diff --git a/conf/eseries/11.80.0/ssd_cache.yaml b/conf/eseries/12.00.0/ssd_cache.yaml similarity index 100% rename from conf/eseries/11.80.0/ssd_cache.yaml rename to conf/eseries/12.00.0/ssd_cache.yaml diff --git a/conf/eseriesperf/11.80.0/ssd_cache.yaml b/conf/eseriesperf/12.00.0/ssd_cache.yaml similarity index 100% rename from conf/eseriesperf/11.80.0/ssd_cache.yaml rename to conf/eseriesperf/12.00.0/ssd_cache.yaml diff --git a/grafana/dashboards/eseries/ssd_cache.json b/grafana/dashboards/eseries/ssd_cache.json index 91bd64124..06352f6c2 100644 --- a/grafana/dashboards/eseries/ssd_cache.json +++ b/grafana/dashboards/eseries/ssd_cache.json @@ -88,6 +88,35 @@ "x": 0, "y": 0 }, + "id": 99, + "panels": [], + "title": "Important Information about SSD Cache dashboard", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 100, + "options": { + "content": "This dashboard is only available from SANtricity OS 12.00+.", + "mode": "markdown" + }, + "pluginVersion": "8.1.8", + "type": "text" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, "id": 1, "panels": [], "title": "Highlights", @@ -163,7 +192,7 @@ "h": 8, "w": 8, "x": 0, - "y": 1 + "y": 5 }, "id": 2, "options": { @@ -272,7 +301,7 @@ "h": 8, "w": 8, "x": 8, - "y": 1 + "y": 5 }, "id": 83, "options": { @@ -381,7 +410,7 @@ "h": 8, "w": 8, "x": 16, - "y": 1 + "y": 5 }, "id": 84, "options": { @@ -426,7 +455,7 @@ "h": 1, "w": 24, "x": 0, - "y": 9 + "y": 13 }, "id": 10, "panels": [ @@ -542,7 +571,7 @@ "h": 10, "w": 24, "x": 0, - "y": 10 + "y": 14 }, "id": 11, "interval": "1m", @@ -781,7 +810,7 @@ "h": 8, "w": 12, "x": 0, - "y": 20 + "y": 24 }, "id": 17, "options": { @@ -882,7 +911,7 @@ "h": 8, "w": 12, "x": 12, - "y": 20 + "y": 24 }, "id": 12, "options": { @@ -983,7 +1012,7 @@ "h": 8, "w": 12, "x": 0, - "y": 28 + "y": 32 }, "id": 18, "options": { @@ -1084,7 +1113,7 @@ "h": 8, "w": 12, "x": 12, - "y": 28 + "y": 32 }, "id": 13, "options": { @@ -1187,7 +1216,7 @@ "h": 8, "w": 12, "x": 0, - "y": 36 + "y": 40 }, "id": 14, "options": { @@ -1296,7 +1325,7 @@ "h": 8, "w": 12, "x": 12, - "y": 36 + "y": 40 }, "id": 15, "options": { @@ -1405,7 +1434,7 @@ "h": 8, "w": 12, "x": 0, - "y": 44 + "y": 48 }, "id": 16, "options": { @@ -1454,7 +1483,7 @@ "h": 1, "w": 24, "x": 0, - "y": 10 + "y": 14 }, "id": 20, "panels": [ @@ -1508,7 +1537,7 @@ "h": 12, "w": 24, "x": 0, - "y": 165 + "y": 169 }, "id": 21, "interval": "1m", @@ -1614,7 +1643,7 @@ "h": 1, "w": 24, "x": 0, - "y": 11 + "y": 15 }, "id": 30, "panels": [ @@ -1654,7 +1683,7 @@ "h": 12, "w": 24, "x": 0, - "y": 194 + "y": 198 }, "id": 31, "interval": "1m", @@ -1725,7 +1754,7 @@ "h": 1, "w": 24, "x": 0, - "y": 12 + "y": 16 }, "id": 40, "panels": [ @@ -1799,7 +1828,7 @@ "h": 12, "w": 12, "x": 0, - "y": 195 + "y": 199 }, "id": 41, "options": { @@ -1906,7 +1935,7 @@ "h": 12, "w": 12, "x": 12, - "y": 195 + "y": 199 }, "id": 42, "options": { @@ -2013,7 +2042,7 @@ "h": 12, "w": 12, "x": 0, - "y": 243 + "y": 247 }, "id": 43, "options": { @@ -2120,7 +2149,7 @@ "h": 12, "w": 12, "x": 12, - "y": 243 + "y": 247 }, "id": 44, "options": { @@ -2167,7 +2196,7 @@ "h": 1, "w": 24, "x": 0, - "y": 13 + "y": 17 }, "id": 50, "panels": [ @@ -2235,7 +2264,7 @@ "h": 12, "w": 12, "x": 0, - "y": 196 + "y": 200 }, "id": 51, "options": { @@ -2336,7 +2365,7 @@ "h": 12, "w": 12, "x": 12, - "y": 196 + "y": 200 }, "id": 52, "options": { @@ -2430,7 +2459,7 @@ "h": 12, "w": 8, "x": 0, - "y": 208 + "y": 212 }, "id": 53, "options": { @@ -2522,7 +2551,7 @@ "h": 12, "w": 8, "x": 8, - "y": 208 + "y": 212 }, "id": 54, "options": { @@ -2614,7 +2643,7 @@ "h": 12, "w": 8, "x": 16, - "y": 208 + "y": 212 }, "id": 55, "options": { @@ -2706,7 +2735,7 @@ "h": 12, "w": 12, "x": 0, - "y": 220 + "y": 224 }, "id": 56, "options": { @@ -2798,7 +2827,7 @@ "h": 12, "w": 12, "x": 12, - "y": 220 + "y": 224 }, "id": 57, "options": { @@ -2843,7 +2872,7 @@ "h": 1, "w": 24, "x": 0, - "y": 14 + "y": 18 }, "id": 60, "panels": [ @@ -2904,7 +2933,7 @@ "h": 12, "w": 12, "x": 0, - "y": 555 + "y": 559 }, "id": 61, "options": { @@ -2996,7 +3025,7 @@ "h": 12, "w": 12, "x": 12, - "y": 555 + "y": 559 }, "id": 62, "options": { @@ -3088,7 +3117,7 @@ "h": 12, "w": 8, "x": 0, - "y": 567 + "y": 571 }, "id": 63, "options": { @@ -3180,7 +3209,7 @@ "h": 12, "w": 8, "x": 8, - "y": 567 + "y": 571 }, "id": 64, "options": { @@ -3272,7 +3301,7 @@ "h": 12, "w": 8, "x": 16, - "y": 567 + "y": 571 }, "id": 65, "options": { @@ -3317,7 +3346,7 @@ "h": 1, "w": 24, "x": 0, - "y": 15 + "y": 19 }, "id": 70, "panels": [ @@ -3385,7 +3414,7 @@ "h": 8, "w": 12, "x": 0, - "y": 170 + "y": 174 }, "id": 71, "options": { @@ -3486,7 +3515,7 @@ "h": 8, "w": 12, "x": 12, - "y": 170 + "y": 174 }, "id": 72, "options": { @@ -3587,7 +3616,7 @@ "h": 8, "w": 12, "x": 0, - "y": 178 + "y": 182 }, "id": 73, "options": { @@ -3688,7 +3717,7 @@ "h": 8, "w": 12, "x": 12, - "y": 178 + "y": 182 }, "id": 74, "options": {