diff --git a/code/go/internal/validator/semantic/validate_kibana_no_legacy_visualizations.go b/code/go/internal/validator/semantic/validate_kibana_no_legacy_visualizations.go new file mode 100644 index 000000000..7e1d40ea6 --- /dev/null +++ b/code/go/internal/validator/semantic/validate_kibana_no_legacy_visualizations.go @@ -0,0 +1,97 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package semantic + +import ( + "path" + + "github.com/elastic/kbncontent" + "github.com/elastic/package-spec/v2/code/go/internal/fspath" + "github.com/elastic/package-spec/v2/code/go/internal/pkgpath" + "github.com/elastic/package-spec/v2/code/go/pkg/specerrors" +) + +// ValidateKibanaNoLegacyVisualizations reports legacy Kibana visualizations in a package. +func ValidateKibanaNoLegacyVisualizations(fsys fspath.FS) specerrors.ValidationErrors { + var errs specerrors.ValidationErrors + + // Collect by-reference visualizations for reference later. + // Note: this does not include Lens, Maps, or Discover. That's okay for this rule because none of those are legacy + visFilePaths := path.Join("kibana", "visualization", "*.json") + visFiles, _ := pkgpath.Files(fsys, visFilePaths) + + for _, file := range visFiles { + filePath := fsys.Path(file.Path()) + + visJSON, err := file.Values("$") + if err != nil { + errs = append(errs, specerrors.NewStructuredErrorf("file \"%s\" is invalid: error getting JSON: %w", filePath, err)) + continue + } + + + visMap, ok := visJSON.(map[string]interface{}) + if !ok { + errs = append(errs, specerrors.NewStructuredErrorf("file \"%s\" is invalid: JSON of unexpected type %T", filePath, visJSON)) + continue + } + + desc, err := kbncontent.DescribeVisualizationSavedObject(visMap) + if err != nil { + errs = append(errs, specerrors.NewStructuredErrorf("file \"%s\" is invalid: error describing visualization saved object: %w", filePath, err)) + continue + } + + if desc.IsLegacy() { + var editor string + if result, err := desc.Editor(); err == nil { + editor = result + } + errs = append(errs, specerrors.NewStructuredErrorf("file \"%s\" is invalid: found legacy visualization \"%s\" (%s, %s)", filePath, desc.Title(), desc.SemanticType(), editor)) + } + } + + dashboardFilePaths := path.Join("kibana", "dashboard", "*.json") + dashboardFiles, err := pkgpath.Files(fsys, dashboardFilePaths) + if err != nil { + errs = append(errs, specerrors.NewStructuredErrorf("error finding Kibana dashboard files: %w", err)) + return errs + } + + for _, file := range dashboardFiles { + filePath := fsys.Path(file.Path()) + + dashboardJSON, err := file.Values("$") + if err != nil { + errs = append(errs, specerrors.NewStructuredErrorf("file \"%s\" is invalid: error getting dashboard JSON: %w", filePath, err)) + continue + } + + dashboardTitle, err := kbncontent.GetDashboardTitle(dashboardJSON) + if err != nil { + errs = append(errs, specerrors.NewStructuredErrorf("file \"%s\" is invalid: error fetching dashboard title: %w", filePath, err)) + continue + } + + visualizations, err := kbncontent.DescribeByValueDashboardPanels(dashboardJSON) + if err != nil { + errs = append(errs, specerrors.NewStructuredErrorf("file \"%s\" is invalid: error describing dashboard panels: %w", filePath, err)) + continue + } + + for _, desc := range visualizations { + if desc.IsLegacy() { + var editor string + if result, err := desc.Editor(); err == nil { + editor = result + } + err := specerrors.NewStructuredErrorf("file \"%s\" is invalid: \"%s\" contains legacy visualization: \"%s\" (%s, %s)", filePath, dashboardTitle, desc.Title(), desc.SemanticType(), editor) + errs = append(errs, err) + } + } + } + + return errs +} diff --git a/code/go/internal/validator/spec.go b/code/go/internal/validator/spec.go index 755d37026..75a6fad01 100644 --- a/code/go/internal/validator/spec.go +++ b/code/go/internal/validator/spec.go @@ -140,6 +140,7 @@ func (s Spec) rules(pkgType string, rootSpec spectypes.ItemSpec) validationRules {fn: semantic.ValidateRoutingRulesAndDataset, types: []string{"integration"}, since: semver.MustParse("2.9.0")}, {fn: semantic.ValidateKibanaNoDanglingObjectIDs, since: semver.MustParse("3.0.0")}, {fn: semantic.ValidateKibanaFilterPresent, since: semver.MustParse("3.0.0")}, + {fn: semantic.ValidateKibanaNoLegacyVisualizations, types: []string{"integration"}, since: semver.MustParse("3.0.0")}, } var validationRules validationRules diff --git a/code/go/pkg/validator/validator_test.go b/code/go/pkg/validator/validator_test.go index 3fa20b341..ae6318314 100644 --- a/code/go/pkg/validator/validator_test.go +++ b/code/go/pkg/validator/validator_test.go @@ -227,6 +227,18 @@ func TestValidateFile(t *testing.T) { `dangling reference found: bad_dangling_object_ids-8287a5d5-1576-4f3a-83c4-444e9058439c (search) (SVR00003)`, }, }, + "kibana_legacy_visualizations": { + "kibana/dashboard/kibana_legacy_visualizations-c36e9b90-596c-11ee-adef-4fe896364076.json", + []string{ + "\"Dashboard with mixed by-value visualizations\" contains legacy visualization: \"Legacy input control vis\" (input_control_vis, Aggs-based)", + "\"Dashboard with mixed by-value visualizations\" contains legacy visualization: \"TSVB time series\" (timeseries, TSVB)", + "\"Dashboard with mixed by-value visualizations\" contains legacy visualization: \"TSVB gauge\" (gauge, TSVB)", + "\"Dashboard with mixed by-value visualizations\" contains legacy visualization: \"Aggs-based table\" (table, Aggs-based)", + "\"Dashboard with mixed by-value visualizations\" contains legacy visualization: \"Aggs-based tag cloud\" (tagcloud, Aggs-based)", + "\"Dashboard with mixed by-value visualizations\" contains legacy visualization: \"\" (heatmap, Aggs-based)", + "\"Dashboard with mixed by-value visualizations\" contains legacy visualization: \"Timelion time series\" (timelion, Timelion)", + }, + }, } for pkgName, test := range tests { diff --git a/compliance/go.mod b/compliance/go.mod index 2f1c844e1..0527981db 100644 --- a/compliance/go.mod +++ b/compliance/go.mod @@ -47,6 +47,7 @@ require ( github.com/elastic/go-resource v0.1.1 // indirect github.com/elastic/go-ucfg v0.8.6 // indirect github.com/elastic/gojsonschema v1.2.1 // indirect + github.com/elastic/kbncontent v0.1.0 // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.7.0 // indirect @@ -125,6 +126,7 @@ require ( github.com/spf13/cast v1.5.0 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/objx v0.5.1 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/ulikunitz/xz v0.5.11 // indirect diff --git a/compliance/go.sum b/compliance/go.sum index 0663eed8c..9c24fa3cc 100644 --- a/compliance/go.sum +++ b/compliance/go.sum @@ -97,6 +97,8 @@ github.com/elastic/go-ucfg v0.8.6 h1:stUeyh2goTgGX+/wb9gzKvTv0YB0231LTpKUgCKj4U0 github.com/elastic/go-ucfg v0.8.6/go.mod h1:4E8mPOLSUV9hQ7sgLEJ4bvt0KhMuDJa8joDT2QGAEKA= github.com/elastic/gojsonschema v1.2.1 h1:cUMbgsz0wyEB4x7xf3zUEvUVDl6WCz2RKcQPul8OsQc= github.com/elastic/gojsonschema v1.2.1/go.mod h1:biw5eBS2Z4T02wjATMRSfecfjCmwaDPvuaqf844gLrg= +github.com/elastic/kbncontent v0.1.0 h1:JTeGDaENizxq8PAmIHvSYVLdmfIYLz0zpUvKGau7go0= +github.com/elastic/kbncontent v0.1.0/go.mod h1:kOPREITK9gSJsiw/WKe7QWSO+PRiZMyEFQCw+CMLAHI= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -351,8 +353,9 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= +github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= diff --git a/go.mod b/go.mod index 220fd0ff7..815a69c2c 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/creasty/defaults v1.7.0 github.com/elastic/go-licenser v0.4.1 github.com/elastic/gojsonschema v1.2.1 + github.com/elastic/kbncontent v0.1.0 github.com/evanphx/json-patch/v5 v5.7.0 github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 github.com/mitchellh/mapstructure v1.5.0 @@ -33,6 +34,7 @@ require ( github.com/mattn/go-isatty v0.0.19 // indirect github.com/pkg/errors v0.8.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/objx v0.5.1 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/sync v0.3.0 // indirect diff --git a/go.sum b/go.sum index 49f544086..94e139211 100644 --- a/go.sum +++ b/go.sum @@ -20,6 +20,8 @@ github.com/elastic/go-licenser v0.4.1 h1:1xDURsc8pL5zYT9R29425J3vkHdt4RT5TNEMeRN github.com/elastic/go-licenser v0.4.1/go.mod h1:V56wHMpmdURfibNBggaSBfqgPxyT1Tldns1i87iTEvU= github.com/elastic/gojsonschema v1.2.1 h1:cUMbgsz0wyEB4x7xf3zUEvUVDl6WCz2RKcQPul8OsQc= github.com/elastic/gojsonschema v1.2.1/go.mod h1:biw5eBS2Z4T02wjATMRSfecfjCmwaDPvuaqf844gLrg= +github.com/elastic/kbncontent v0.1.0 h1:JTeGDaENizxq8PAmIHvSYVLdmfIYLz0zpUvKGau7go0= +github.com/elastic/kbncontent v0.1.0/go.mod h1:kOPREITK9gSJsiw/WKe7QWSO+PRiZMyEFQCw+CMLAHI= github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= @@ -58,8 +60,15 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= +github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= diff --git a/spec/changelog.yml b/spec/changelog.yml index 02c3fb9c7..8dde6a233 100644 --- a/spec/changelog.yml +++ b/spec/changelog.yml @@ -22,6 +22,9 @@ - description: Require filter in dashboards to limit scope of queries type: breaking-change link: https://github.com/elastic/package-spec/pull/607 + - description: Disallow legacy visualizations + type: breaking-change + link: https://github.com/elastic/package-spec/pull/610 - version: 2.12.1-next changes: - description: Allow to define expected values in fields definitions. diff --git a/test/packages/good_v3/kibana/dashboard/good_v3-dashboard-abc-1.json b/test/packages/good_v3/kibana/dashboard/good_v3-dashboard-abc-1.json index c65e0a345..1c357cf52 100644 --- a/test/packages/good_v3/kibana/dashboard/good_v3-dashboard-abc-1.json +++ b/test/packages/good_v3/kibana/dashboard/good_v3-dashboard-abc-1.json @@ -4,6 +4,7 @@ "attributes": { "description": "", "hits": 0, + "panelsJSON": "[]", "kibanaSavedObjectMeta": { "searchSourceJSON": { "filter": [ diff --git a/test/packages/good_v3/kibana/visualization/good_v3-visualization-abc-1.json b/test/packages/good_v3/kibana/visualization/good_v3-visualization-abc-1.json index 9effeb8e9..46ae15cb6 100644 --- a/test/packages/good_v3/kibana/visualization/good_v3-visualization-abc-1.json +++ b/test/packages/good_v3/kibana/visualization/good_v3-visualization-abc-1.json @@ -1,4 +1,35 @@ { + "type": "visualization", "id": "good_v3-visualization-abc-1", - "type": "visualization" -} \ No newline at end of file + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "title": "Placeholder Title", + "uiStateJSON": {}, + "version": 1, + "visState": { + "aggs": [], + "params": { + "fontSize": 12, + "markdown": "# A title", + "openLinksInNewTab": false + }, + "title": "Placeholder Title", + "type": "markdown" + } + }, + "coreMigrationVersion": "8.7.1", + "created_at": "2023-09-22T17:32:48.743Z", + "migrationVersion": { + "visualization": "8.5.0" + }, + "references": [] +} diff --git a/test/packages/kibana_legacy_visualizations/changelog.yml b/test/packages/kibana_legacy_visualizations/changelog.yml new file mode 100644 index 000000000..04688a4cb --- /dev/null +++ b/test/packages/kibana_legacy_visualizations/changelog.yml @@ -0,0 +1,5 @@ +- version: 0.1.2 + changes: + - description: initial release + type: enhancement + link: https://github.com/elastic/package-spec/pull/160 \ No newline at end of file diff --git a/test/packages/kibana_legacy_visualizations/docs/README.md b/test/packages/kibana_legacy_visualizations/docs/README.md new file mode 100644 index 000000000..1c9bf4968 --- /dev/null +++ b/test/packages/kibana_legacy_visualizations/docs/README.md @@ -0,0 +1 @@ +Main \ No newline at end of file diff --git a/test/packages/kibana_legacy_visualizations/kibana/dashboard/kibana_legacy_visualizations-c36e9b90-596c-11ee-adef-4fe896364076.json b/test/packages/kibana_legacy_visualizations/kibana/dashboard/kibana_legacy_visualizations-c36e9b90-596c-11ee-adef-4fe896364076.json new file mode 100644 index 000000000..9e93e8f1d --- /dev/null +++ b/test/packages/kibana_legacy_visualizations/kibana/dashboard/kibana_legacy_visualizations-c36e9b90-596c-11ee-adef-4fe896364076.json @@ -0,0 +1,1017 @@ +{ + "attributes": { + "controlGroupInput": { + "chainingSystem": "HIERARCHICAL", + "controlStyle": "oneLine", + "ignoreParentSettingsJSON": "{\"ignoreFilters\":false,\"ignoreQuery\":false,\"ignoreTimerange\":false,\"ignoreValidations\":false}", + "panelsJSON": "{\"332c44e9-b2a2-4d26-96c4-49562da1ba93\":{\"type\":\"optionsListControl\",\"order\":0,\"grow\":true,\"width\":\"medium\",\"explicitInput\":{\"id\":\"332c44e9-b2a2-4d26-96c4-49562da1ba93\",\"fieldName\":\"agent.id\",\"title\":\"agent.id\",\"enhancements\":{}}}}" + }, + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "field": "agent.type", + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "agent.type", + "negate": false, + "params": { + "query": "filebeat" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "agent.type": "filebeat" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "optionsJSON": { + "hidePanelTitles": false, + "syncColors": false, + "syncCursor": true, + "syncTooltips": false, + "useMargins": true + }, + "panelsJSON": [ + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [], + "searchSource": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "id": "", + "params": { + "controls": [ + { + "fieldName": "agent.id", + "id": "1695403260945", + "indexPatternRefName": "control_9d6acabf-1b0a-4b36-99c4-eb3a2f1f4673_0_index_pattern", + "label": "I'm a control", + "options": { + "dynamicOptions": true, + "multiselect": true, + "order": "desc", + "size": 5, + "type": "terms" + }, + "parent": "", + "type": "list" + } + ], + "pinFilters": false, + "updateFiltersOnChange": true, + "useTimeFilter": false + }, + "title": "", + "type": "input_control_vis", + "uiState": {} + } + }, + "gridData": { + "h": 5, + "i": "9d6acabf-1b0a-4b36-99c4-eb3a2f1f4673", + "w": 12, + "x": 0, + "y": 0 + }, + "panelIndex": "9d6acabf-1b0a-4b36-99c4-eb3a2f1f4673", + "title": "Legacy input control vis", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "savedVis": { + "data": { + "aggs": [], + "searchSource": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "id": "", + "params": { + "fontSize": 12, + "markdown": "# The Good", + "openLinksInNewTab": false + }, + "title": "", + "type": "markdown", + "uiState": {} + } + }, + "gridData": { + "h": 3, + "i": "e9f4b7cd-8f6b-498f-9934-16e187139a9e", + "w": 48, + "x": 0, + "y": 5 + }, + "panelIndex": "e9f4b7cd-8f6b-498f-9934-16e187139a9e", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-85c9c01e-13df-42a2-b33d-8441fb83afaf", + "type": "index-pattern" + } + ], + "state": { + "adHocDataViews": {}, + "datasourceStates": { + "formBased": { + "layers": { + "85c9c01e-13df-42a2-b33d-8441fb83afaf": { + "columnOrder": [ + "e88818c5-d9ff-467e-b231-2e97d611a9a7", + "17c707aa-0ede-444e-81ed-9816983d6479" + ], + "columns": { + "17c707aa-0ede-444e-81ed-9816983d6479": { + "dataType": "number", + "isBucketed": false, + "label": "Count of records", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "e88818c5-d9ff-467e-b231-2e97d611a9a7": { + "dataType": "string", + "isBucketed": true, + "label": "Top 5 values of agent.id", + "operationType": "terms", + "params": { + "exclude": [], + "excludeIsRegex": false, + "include": [], + "includeIsRegex": false, + "missingBucket": false, + "orderBy": { + "columnId": "17c707aa-0ede-444e-81ed-9816983d6479", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "parentFormat": { + "id": "terms" + }, + "size": 5 + }, + "scale": "ordinal", + "sourceField": "agent.id" + } + }, + "incompleteColumns": {}, + "sampling": 1 + } + } + }, + "textBased": { + "layers": {} + } + }, + "filters": [], + "internalReferences": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "axisTitlesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "fittingFunction": "None", + "gridlinesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "labelsOrientation": { + "x": 0, + "yLeft": 0, + "yRight": 0 + }, + "layers": [ + { + "accessors": [ + "17c707aa-0ede-444e-81ed-9816983d6479" + ], + "layerId": "85c9c01e-13df-42a2-b33d-8441fb83afaf", + "layerType": "data", + "position": "top", + "seriesType": "bar_stacked", + "showGridlines": false, + "xAccessor": "e88818c5-d9ff-467e-b231-2e97d611a9a7" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "bar_stacked", + "tickLabelsVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "valueLabels": "hide" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "46426c7d-7683-400c-b625-49d0114f41a0", + "w": 24, + "x": 0, + "y": 8 + }, + "panelIndex": "46426c7d-7683-400c-b625-49d0114f41a0", + "title": "Lens bar", + "type": "lens", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [], + "searchSource": {} + }, + "description": "", + "id": "", + "params": { + "spec": "{\n/*\n\nWelcome to Vega visualizations. Here you can design your own dataviz from scratch using a declarative language called Vega, or its simpler form Vega-Lite. In Vega, you have the full control of what data is loaded, even from multiple sources, how that data is transformed, and what visual elements are used to show it. Use help icon to view Vega examples, tutorials, and other docs. Use the wrench icon to reformat this text, or to remove comments.\n\nThis example graph shows the document count in all indexes in the current time range. You might need to adjust the time filter in the upper right corner.\n*/\n\n $schema: https://vega.github.io/schema/vega-lite/v5.json\n title: Event counts from all indexes\n\n // Define the data source\n data: {\n url: {\n/*\nAn object instead of a string for the \"url\" param is treated as an Elasticsearch query. Anything inside this object is not part of the Vega language, but only understood by Kibana and Elasticsearch server. This query counts the number of documents per time interval, assuming you have a @timestamp field in your data.\n\nKibana has a special handling for the fields surrounded by \"%\". They are processed before the the query is sent to Elasticsearch. This way the query becomes context aware, and can use the time range and the dashboard filters.\n*/\n\n // Apply dashboard context filters when set\n %context%: true\n // Filter the time picker (upper right corner) with this field\n %timefield%: @timestamp\n\n/*\nSee .search() documentation for : https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search\n*/\n\n // Which index to search\n index: _all\n // Aggregate data by the time field into time buckets, counting the number of documents in each bucket.\n body: {\n aggs: {\n time_buckets: {\n date_histogram: {\n // Use date histogram aggregation on @timestamp field\n field: @timestamp\n // The interval value will depend on the daterange picker (true), or use an integer to set an approximate bucket count\n interval: {%autointerval%: true}\n // Make sure we get an entire range, even if it has no data\n extended_bounds: {\n // Use the current time range's start and end\n min: {%timefilter%: \"min\"}\n max: {%timefilter%: \"max\"}\n }\n // Use this for linear (e.g. line, area) graphs. Without it, empty buckets will not show up\n min_doc_count: 0\n }\n }\n }\n // Speed up the response by only including aggregation results\n size: 0\n }\n }\n/*\nElasticsearch will return results in this format:\n\naggregations: {\n time_buckets: {\n buckets: [\n {\n key_as_string: 2015-11-30T22:00:00.000Z\n key: 1448920800000\n doc_count: 0\n },\n {\n key_as_string: 2015-11-30T23:00:00.000Z\n key: 1448924400000\n doc_count: 0\n }\n ...\n ]\n }\n}\n\nFor our graph, we only need the list of bucket values. Use the format.property to discard everything else.\n*/\n format: {property: \"aggregations.time_buckets.buckets\"}\n }\n\n // \"mark\" is the graphics element used to show our data. Other mark values are: area, bar, circle, line, point, rect, rule, square, text, and tick. See https://vega.github.io/vega-lite/docs/mark.html\n mark: line\n\n // \"encoding\" tells the \"mark\" what data to use and in what way. See https://vega.github.io/vega-lite/docs/encoding.html\n encoding: {\n x: {\n // The \"key\" value is the timestamp in milliseconds. Use it for X axis.\n field: key\n type: temporal\n axis: {title: false} // Customize X axis format\n }\n y: {\n // The \"doc_count\" is the count per bucket. Use it for Y axis.\n field: doc_count\n type: quantitative\n axis: {title: \"Document count\"}\n }\n }\n}\n" + }, + "title": "", + "type": "vega", + "uiState": {} + } + }, + "gridData": { + "h": 15, + "i": "12316c43-e92e-415b-9b6f-7a1a1c0a0f07", + "w": 24, + "x": 24, + "y": 8 + }, + "panelIndex": "12316c43-e92e-415b-9b6f-7a1a1c0a0f07", + "title": "Vega time series", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "attributes": { + "description": "", + "layerListJSON": "[{\"locale\":\"autoselect\",\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"isAutoSelect\":true,\"lightModeDefault\":\"road_map_desaturated\"},\"id\":\"909a0001-15f6-40b7-8be5-fadddcc358c1\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":1,\"visible\":true,\"style\":{\"type\":\"EMS_VECTOR_TILE\",\"color\":\"\"},\"includeInFitToBounds\":true,\"type\":\"EMS_VECTOR_TILE\"}]", + "mapStateJSON": "{\"adHocDataViews\":[],\"zoom\":1.6,\"center\":{\"lon\":0,\"lat\":19.94277},\"timeFilters\":{\"from\":\"now-15m\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":true,\"interval\":60000},\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filters\":[],\"settings\":{\"autoFitToDataBounds\":false,\"backgroundColor\":\"#ffffff\",\"customIcons\":[],\"disableInteractive\":false,\"disableTooltipControl\":false,\"hideToolbarOverlay\":false,\"hideLayerControl\":false,\"hideViewControl\":false,\"initialLocation\":\"LAST_SAVED_LOCATION\",\"fixedLocation\":{\"lat\":0,\"lon\":0,\"zoom\":2},\"browserLocation\":{\"zoom\":2},\"keydownScrollZoom\":false,\"maxZoom\":24,\"minZoom\":0,\"showScaleControl\":false,\"showSpatialFilters\":true,\"showTimesliderToggleButton\":true,\"spatialFiltersAlpa\":0.3,\"spatialFiltersFillColor\":\"#DA8B45\",\"spatialFiltersLineColor\":\"#DA8B45\"}}", + "title": "", + "uiStateJSON": "{\"isLayerTOCOpen\":true,\"openTOCDetails\":[]}" + }, + "enhancements": {}, + "hiddenLayers": [], + "isLayerTOCOpen": true, + "mapBuffer": { + "maxLat": 66.51326, + "maxLon": 180, + "minLat": -66.51326, + "minLon": -180 + }, + "mapCenter": { + "lat": 19.94277, + "lon": 0, + "zoom": 1.6 + }, + "openTOCDetails": [] + }, + "gridData": { + "h": 15, + "i": "9d948dba-ebb0-4b9e-aa1c-de56ada1d9fb", + "w": 24, + "x": 0, + "y": 23 + }, + "panelIndex": "9d948dba-ebb0-4b9e-aa1c-de56ada1d9fb", + "type": "map", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [], + "searchSource": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "id": "", + "params": { + "axis_formatter": "number", + "axis_position": "left", + "axis_scale": "normal", + "drop_last_bucket": 0, + "id": "269c9bd6-6d39-43ee-a736-ca2d3bc8c86d", + "index_pattern_ref_name": "metrics_aa45e28a-56ef-49a9-bf7b-57e7adbe74e9_0_index_pattern", + "interval": "", + "markdown": "# Hai {{ count.last.raw }}", + "max_lines_legend": 1, + "series": [ + { + "axis_position": "right", + "chart_type": "line", + "color": "#68BC00", + "fill": 0.5, + "formatter": "default", + "id": "a9130cea-528c-40ce-b67d-d5a1d650a9f3", + "line_width": 1, + "metrics": [ + { + "id": "1e09d941-507c-4621-8431-69582d7f1f52", + "type": "count" + } + ], + "override_index_pattern": 0, + "palette": { + "name": "default", + "type": "palette" + }, + "point_size": 1, + "separate_axis": 0, + "series_drop_last_bucket": 0, + "split_mode": "everything", + "stacked": "none", + "time_range_mode": "entire_time_range" + } + ], + "show_grid": 1, + "show_legend": 1, + "time_field": "", + "time_range_mode": "entire_time_range", + "tooltip_mode": "show_all", + "truncate_legend": 1, + "type": "markdown", + "use_kibana_indexes": true + }, + "title": "", + "type": "metrics", + "uiState": {} + } + }, + "gridData": { + "h": 15, + "i": "aa45e28a-56ef-49a9-bf7b-57e7adbe74e9", + "w": 24, + "x": 0, + "y": 59 + }, + "panelIndex": "aa45e28a-56ef-49a9-bf7b-57e7adbe74e9", + "title": "TSVB Markdown", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "savedVis": { + "data": { + "aggs": [], + "searchSource": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "params": { + "fontSize": 12, + "markdown": "# The Bad", + "openLinksInNewTab": false + }, + "title": "", + "type": "markdown", + "uiState": {} + } + }, + "gridData": { + "h": 3, + "i": "1aa4828f-cac5-406c-8dcc-cc91c4b23564", + "w": 48, + "x": 0, + "y": 38 + }, + "panelIndex": "1aa4828f-cac5-406c-8dcc-cc91c4b23564", + "title": "", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "savedVis": { + "data": { + "aggs": [], + "searchSource": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "params": { + "fontSize": 12, + "markdown": "## TSVB", + "openLinksInNewTab": false + }, + "title": "", + "type": "markdown", + "uiState": {} + } + }, + "gridData": { + "h": 3, + "i": "20be122a-5169-4551-b519-f346ca91ce93", + "w": 48, + "x": 0, + "y": 41 + }, + "panelIndex": "20be122a-5169-4551-b519-f346ca91ce93", + "title": "", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [], + "searchSource": {} + }, + "description": "", + "id": "", + "params": { + "axis_formatter": "number", + "axis_position": "left", + "axis_scale": "normal", + "drop_last_bucket": 0, + "id": "2151dff1-0ac0-4364-bd3b-1b2dc6ad4a9d", + "index_pattern_ref_name": "metrics_fc613301-637a-4fb8-a9c1-408041b534eb_0_index_pattern", + "interval": "", + "max_lines_legend": 1, + "series": [ + { + "axis_position": "right", + "chart_type": "line", + "color": "#68BC00", + "fill": 0.5, + "formatter": "default", + "id": "9d2312fc-5cd1-4704-bed6-c90a189fdc3c", + "line_width": 1, + "metrics": [ + { + "id": "ff45b058-0b35-43e9-b5cc-86cf6bb59a2f", + "type": "count" + } + ], + "override_index_pattern": 0, + "palette": { + "name": "default", + "type": "palette" + }, + "point_size": 1, + "separate_axis": 0, + "series_drop_last_bucket": 0, + "split_mode": "everything", + "stacked": "none" + } + ], + "show_grid": 1, + "show_legend": 1, + "time_field": "", + "tooltip_mode": "show_all", + "truncate_legend": 1, + "type": "timeseries", + "use_kibana_indexes": true + }, + "title": "", + "type": "metrics", + "uiState": {} + } + }, + "gridData": { + "h": 15, + "i": "fc613301-637a-4fb8-a9c1-408041b534eb", + "w": 24, + "x": 0, + "y": 44 + }, + "panelIndex": "fc613301-637a-4fb8-a9c1-408041b534eb", + "title": "TSVB time series", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [], + "searchSource": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "id": "", + "params": { + "axis_formatter": "number", + "axis_position": "left", + "axis_scale": "normal", + "drop_last_bucket": 0, + "gauge_color_rules": [ + { + "id": "9ad81810-596b-11ee-9f91-cf341ef7bf75" + } + ], + "gauge_inner_width": 10, + "gauge_style": "half", + "gauge_width": 10, + "id": "6be570b5-d3f4-41d3-8b67-b01c235bd94d", + "index_pattern_ref_name": "metrics_57c0c87b-3c99-4d2a-8eab-c0f6be5100df_0_index_pattern", + "interval": "", + "isModelInvalid": false, + "max_lines_legend": 1, + "series": [ + { + "axis_position": "right", + "chart_type": "line", + "color": "#68BC00", + "fill": 0.5, + "formatter": "default", + "id": "ba95c76c-afd7-4cd5-9632-459a6678bc13", + "line_width": 1, + "metrics": [ + { + "id": "4ec74301-3205-4f85-9c8d-a11f44638603", + "type": "count" + } + ], + "override_index_pattern": 0, + "palette": { + "name": "default", + "type": "palette" + }, + "point_size": 1, + "separate_axis": 0, + "series_drop_last_bucket": 0, + "split_mode": "everything", + "stacked": "none", + "time_range_mode": "entire_time_range" + } + ], + "show_grid": 1, + "show_legend": 1, + "time_field": "", + "time_range_mode": "last_value", + "tooltip_mode": "show_all", + "truncate_legend": 1, + "type": "gauge", + "use_kibana_indexes": true + }, + "title": "", + "type": "metrics", + "uiState": {} + } + }, + "gridData": { + "h": 15, + "i": "57c0c87b-3c99-4d2a-8eab-c0f6be5100df", + "w": 24, + "x": 24, + "y": 44 + }, + "panelIndex": "57c0c87b-3c99-4d2a-8eab-c0f6be5100df", + "title": "TSVB gauge", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "savedVis": { + "data": { + "aggs": [], + "searchSource": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "params": { + "fontSize": 12, + "markdown": "## Aggs-based", + "openLinksInNewTab": false + }, + "title": "", + "type": "markdown", + "uiState": {} + } + }, + "gridData": { + "h": 3, + "i": "24272e20-9101-47b0-914f-13bd0a75c34f", + "w": 48, + "x": 0, + "y": 74 + }, + "panelIndex": "24272e20-9101-47b0-914f-13bd0a75c34f", + "title": "", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "emptyAsNull": false + }, + "schema": "metric", + "type": "count" + } + ], + "searchSource": { + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index" + } + }, + "description": "", + "id": "", + "params": { + "autoFitRowToContent": false, + "perPage": 10, + "percentageCol": "", + "showMetricsAtAllLevels": false, + "showPartialRows": false, + "showToolbar": false, + "showTotal": false, + "totalFunc": "sum" + }, + "title": "", + "type": "table", + "uiState": {} + } + }, + "gridData": { + "h": 15, + "i": "c8a5f48d-411a-49cf-bfc2-2647eb4354e3", + "w": 24, + "x": 0, + "y": 77 + }, + "panelIndex": "c8a5f48d-411a-49cf-bfc2-2647eb4354e3", + "title": "Aggs-based table", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "emptyAsNull": false + }, + "schema": "metric", + "type": "count" + }, + { + "enabled": true, + "id": "2", + "params": { + "excludeIsRegex": true, + "field": "host.ip", + "includeIsRegex": true, + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "1", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 5 + }, + "schema": "segment", + "type": "terms" + } + ], + "searchSource": { + "filter": [], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "id": "", + "params": { + "maxFontSize": 72, + "minFontSize": 18, + "orientation": "single", + "palette": { + "name": "default", + "type": "palette" + }, + "scale": "linear", + "showLabel": true + }, + "title": "", + "type": "tagcloud", + "uiState": {} + } + }, + "gridData": { + "h": 15, + "i": "faf4e2b9-c4b7-4f7f-9688-124fc99d9c0c", + "w": 24, + "x": 24, + "y": 77 + }, + "panelIndex": "faf4e2b9-c4b7-4f7f-9688-124fc99d9c0c", + "title": "Aggs-based tag cloud", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "savedVis": { + "data": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "emptyAsNull": false + }, + "schema": "metric", + "type": "count" + } + ], + "searchSource": { + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index" + } + }, + "description": "", + "id": "", + "params": { + "addLegend": true, + "addTooltip": true, + "colorSchema": "Green to Red", + "colorsNumber": 4, + "colorsRange": [], + "enableHover": false, + "invertColors": false, + "legendPosition": "right", + "percentageMode": false, + "setColorRange": false, + "type": "heatmap", + "valueAxes": [ + { + "id": "ValueAxis-1", + "labels": { + "color": "black", + "overwriteColor": false, + "rotate": 0, + "show": false + }, + "scale": { + "defaultYExtents": false, + "type": "linear" + }, + "show": false, + "type": "value" + } + ] + }, + "title": "", + "type": "heatmap", + "uiState": { + "vis": { + "defaultColors": { + "0 - 600": "rgb(0,104,55)", + "1,200 - 1,800": "rgb(254,254,189)", + "1,800 - 2,400": "rgb(248,141,82)", + "600 - 1,200": "rgb(134,203,102)" + } + } + } + }, + "vis": null + }, + "gridData": { + "h": 15, + "i": "f630e819-7606-456a-a722-325e4c88716c", + "w": 24, + "x": 0, + "y": 92 + }, + "panelIndex": "f630e819-7606-456a-a722-325e4c88716c", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [], + "searchSource": {} + }, + "description": "", + "id": "", + "params": { + "expression": ".es(*)", + "interval": "auto" + }, + "title": "", + "type": "timelion", + "uiState": {} + } + }, + "gridData": { + "h": 15, + "i": "56cffae7-57b2-4c9b-b186-15741c6b20b6", + "w": 24, + "x": 24, + "y": 92 + }, + "panelIndex": "56cffae7-57b2-4c9b-b186-15741c6b20b6", + "title": "Timelion time series", + "type": "visualization", + "version": "8.7.1" + }, + { + "embeddableConfig": { + "enhancements": {} + }, + "gridData": { + "h": 15, + "i": "6cc10baa-1976-4288-ba3a-9b8b8d5a5373", + "w": 24, + "x": 24, + "y": 23 + }, + "panelIndex": "6cc10baa-1976-4288-ba3a-9b8b8d5a5373", + "panelRefName": "panel_6cc10baa-1976-4288-ba3a-9b8b8d5a5373", + "type": "search", + "version": "8.7.1" + } + ], + "timeRestore": false, + "title": "Dashboard with mixed by-value visualizations", + "version": 1 + }, + "coreMigrationVersion": "8.7.1", + "created_at": "2023-09-22T20:06:49.801Z", + "id": "kibana_legacy_visualizations-c36e9b90-596c-11ee-adef-4fe896364076", + "migrationVersion": { + "dashboard": "8.7.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "9d6acabf-1b0a-4b36-99c4-eb3a2f1f4673:control_9d6acabf-1b0a-4b36-99c4-eb3a2f1f4673_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "46426c7d-7683-400c-b625-49d0114f41a0:indexpattern-datasource-layer-85c9c01e-13df-42a2-b33d-8441fb83afaf", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "aa45e28a-56ef-49a9-bf7b-57e7adbe74e9:metrics_aa45e28a-56ef-49a9-bf7b-57e7adbe74e9_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "fc613301-637a-4fb8-a9c1-408041b534eb:metrics_fc613301-637a-4fb8-a9c1-408041b534eb_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "57c0c87b-3c99-4d2a-8eab-c0f6be5100df:metrics_57c0c87b-3c99-4d2a-8eab-c0f6be5100df_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "c8a5f48d-411a-49cf-bfc2-2647eb4354e3:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "faf4e2b9-c4b7-4f7f-9688-124fc99d9c0c:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "f630e819-7606-456a-a722-325e4c88716c:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "kibana_legacy_visualizations-8f2e0810-596d-11ee-adef-4fe896364076", + "name": "6cc10baa-1976-4288-ba3a-9b8b8d5a5373:panel_6cc10baa-1976-4288-ba3a-9b8b8d5a5373", + "type": "search" + }, + { + "id": "logs-*", + "name": "controlGroup_332c44e9-b2a2-4d26-96c4-49562da1ba93:optionsListDataView", + "type": "index-pattern" + } + ], + "type": "dashboard" +} \ No newline at end of file diff --git a/test/packages/kibana_legacy_visualizations/kibana/search/kibana_legacy_visualizations-8f2e0810-596d-11ee-adef-4fe896364076.json b/test/packages/kibana_legacy_visualizations/kibana/search/kibana_legacy_visualizations-8f2e0810-596d-11ee-adef-4fe896364076.json new file mode 100644 index 000000000..619721e98 --- /dev/null +++ b/test/packages/kibana_legacy_visualizations/kibana/search/kibana_legacy_visualizations-8f2e0810-596d-11ee-adef-4fe896364076.json @@ -0,0 +1,45 @@ +{ + "attributes": { + "columns": [ + "agent.id", + "agent.name" + ], + "description": "", + "grid": {}, + "hideChart": false, + "isTextBasedQuery": false, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "agent.name : \"docker-fleet-server\" " + } + } + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "timeRestore": false, + "title": "My saved search", + "usesAdHocDataView": false + }, + "coreMigrationVersion": "8.7.1", + "created_at": "2023-09-22T17:29:18.353Z", + "id": "kibana_legacy_visualizations-8f2e0810-596d-11ee-adef-4fe896364076", + "migrationVersion": { + "search": "8.0.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search" +} \ No newline at end of file diff --git a/test/packages/kibana_legacy_visualizations/manifest.yml b/test/packages/kibana_legacy_visualizations/manifest.yml new file mode 100644 index 000000000..5a4718fb0 --- /dev/null +++ b/test/packages/kibana_legacy_visualizations/manifest.yml @@ -0,0 +1,9 @@ +format_version: 3.0.0 +name: kibana_legacy_visualizations +title: Kibana Legacy Visualizations +description: This package contains a set of legacy and non-legacy Kibana assets +version: 0.1.2 +type: integration +owner: + github: elastic/foobar + type: elastic