Skip to content

Commit

Permalink
Follow up changes in dashboards in mage check && fix minor issue (ela…
Browse files Browse the repository at this point in the history
…stic#27553)

## What does this PR do?

This PR follows up the missing dashboard checks in `mage check`. It also addresses a minor dashboard decoding issue in `-decode` flag of `export dashboard`.

Furthermore, assets from the Saved Objects API are separated into different JSON files. We went back to JSONs to make it more developer-friendly. By sticking with the more human-readable JSONs it helps people to review changes a bit better.

When exporting dashboards I suggest you use the `-folder` flag. You have to specify a root folder e.g. a module name and the Beat/exporter will create a `{foldername}/_meta/kibana/7` folder for you. The assets will be separated into different directories and the name of them will be the ID of the asset.

```sh
$ ./filebeat export dashboard --id Metricbeat-host-overview --folder system
$ tree metricbeat/module/system/_meta/kibana/7
metricbeat/module/system/_meta/kibana/7
├── dashboard
│   ├── 79ffd6e0-faa0-11e6-947f-177f697178b8-ecs.json
│   ├── c431f410-f9ac-11e9-90e8-1fb18e796788.json
│   ├── CPU-slash-Memory-per-container-ecs.json
│   └── Metricbeat-system-overview-ecs.json
└── visualization
    ├── 089b85d0-1b16-11e7-b09e-037021c4f8df-ecs.json
    ├── 19e123b0-4d5a-11e7-aee5-fdc812cc3bec-ecs.json
    ├── 1aae9140-1b93-11e7-8ada-3df93aab833e-ecs.json
    ├── 26732e20-1b91-11e7-bec4-a5e9ec5cab8b-ecs.json
    ├── 2e224660-1b19-11e7-b09e-037021c4f8df-ecs.json
    ├── 34f97ee0-1b96-11e7-8ada-3df93aab833e-ecs.json
    ├── 3d65d450-a9c3-11e7-af20-67db8aecb295-ecs.json
    ├── 4b254630-f998-11e9-90e8-1fb18e796788.json
    ├── 4d546850-1b15-11e7-b09e-037021c4f8df-ecs.json
    ├── 4e4bb1e0-1b1b-11e7-b09e-037021c4f8df-ecs.json
    ├── 522ee670-1b92-11e7-bec4-a5e9ec5cab8b-ecs.json
    ├── 590a60f0-5d87-11e7-8884-1bb4c3b890e4-ecs.json
    ├── 6b7b9a40-faa1-11e6-86b1-cd7735ff7e23-ecs.json
    ├── 7cdb1330-4d1a-11e7-a196-69b9a7a020a9-ecs.json
    ├── 825fdb80-4d1d-11e7-b5f2-2b7c1895bf32-ecs.json
    ├── 83e12df0-1b91-11e7-bec4-a5e9ec5cab8b-ecs.json
    ├── 855899e0-1b1c-11e7-b09e-037021c4f8df-ecs.json
    ├── 8c071e20-f999-11e9-90e8-1fb18e796788.json
    ├── 96976150-4d5d-11e7-aa29-87a97a796de6-ecs.json
    ├── 99381c80-4d60-11e7-9a4c-ed99bbcaa42b-ecs.json
    ├── 9c69cad0-f9b0-11e9-90e8-1fb18e796788.json
    ├── a30871f0-f98f-11e9-90e8-1fb18e796788.json
    ├── ab2d1e90-1b1a-11e7-b09e-037021c4f8df-ecs.json
    ├── bb3a8720-f991-11e9-90e8-1fb18e796788.json
    ├── bfa5e400-1b16-11e7-b09e-037021c4f8df-ecs.json
    ├── c5e3cf90-4d60-11e7-9a4c-ed99bbcaa42b-ecs.json
    ├── c6f2ffd0-4d17-11e7-a196-69b9a7a020a9-ecs.json
    ├── Container-Block-IO-ecs.json
    ├── Container-CPU-usage-ecs.json
    ├── Container-Memory-stats-ecs.json
    ├── d2e80340-4d5c-11e7-aa29-87a97a796de6-ecs.json
    ├── d3166e80-1b91-11e7-bec4-a5e9ec5cab8b-ecs.json
    ├── d3f51850-f9b6-11e9-90e8-1fb18e796788.json
    ├── e0f001c0-1b18-11e7-b09e-037021c4f8df-ecs.json
    ├── e6e639e0-f992-11e9-90e8-1fb18e796788.json
    ├── fe064790-1b1f-11e7-bec4-a5e9ec5cab8b-ecs.json
    └── System-Navigation-ecs.json
```

## Why is it important?

It adds extra checks that make sure dashboards are formatted correctly.

It also makes dashboard  exporting more developer friendly.
  • Loading branch information
kvch authored and wiwen committed Nov 1, 2021
1 parent aa59867 commit 33ef1bb
Show file tree
Hide file tree
Showing 2,192 changed files with 214,215 additions and 2,327 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"attributes": {
"description": "Summary of socket related syscall events.",
"hits": 0,
"kibanaSavedObjectMeta": {
"searchSourceJSON": {
"filter": [],
"highlightAll": true,
"query": {
"language": "kuery",
"query": ""
},
"version": true
}
},
"optionsJSON": {
"darkTheme": false,
"useMargins": false
},
"panelsJSON": [
{
"embeddableConfig": {
"enhancements": {},
"vis": {
"params": {
"sort": {
"columnIndex": null,
"direction": null
}
}
}
},
"gridData": {
"h": 16,
"i": "1",
"w": 24,
"x": 24,
"y": 12
},
"panelIndex": "1",
"panelRefName": "panel_1",
"type": "visualization",
"version": "7.3.0"
},
{
"embeddableConfig": {
"enhancements": {},
"vis": {
"params": {
"sort": {
"columnIndex": null,
"direction": null
}
}
}
},
"gridData": {
"h": 20,
"i": "2",
"w": 24,
"x": 0,
"y": 28
},
"panelIndex": "2",
"panelRefName": "panel_2",
"type": "visualization",
"version": "7.3.0"
},
{
"embeddableConfig": {
"enhancements": {},
"vis": {
"params": {
"sort": {
"columnIndex": null,
"direction": null
}
}
}
},
"gridData": {
"h": 20,
"i": "3",
"w": 24,
"x": 24,
"y": 28
},
"panelIndex": "3",
"panelRefName": "panel_3",
"type": "visualization",
"version": "7.3.0"
},
{
"embeddableConfig": {
"enhancements": {}
},
"gridData": {
"h": 12,
"i": "4",
"w": 48,
"x": 0,
"y": 0
},
"panelIndex": "4",
"panelRefName": "panel_4",
"type": "visualization",
"version": "7.3.0"
},
{
"embeddableConfig": {
"enhancements": {}
},
"gridData": {
"h": 16,
"i": "5",
"w": 24,
"x": 0,
"y": 12
},
"panelIndex": "5",
"panelRefName": "panel_5",
"type": "visualization",
"version": "7.3.0"
}
],
"timeRestore": false,
"title": "[Auditbeat Auditd] Sockets ECS",
"version": 1
},
"coreMigrationVersion": "8.0.0",
"id": "693a5f40-c243-11e7-8692-232bd1143e8a-ecs",
"migrationVersion": {
"dashboard": "7.14.0"
},
"references": [
{
"id": "faf882f0-c242-11e7-8692-232bd1143e8a-ecs",
"name": "1:panel_1",
"type": "visualization"
},
{
"id": "ea483730-c246-11e7-8692-232bd1143e8a-ecs",
"name": "2:panel_2",
"type": "visualization"
},
{
"id": "ceb91de0-c250-11e7-8692-232bd1143e8a-ecs",
"name": "3:panel_3",
"type": "visualization"
},
{
"id": "b21e0c70-c252-11e7-8692-232bd1143e8a-ecs",
"name": "4:panel_4",
"type": "visualization"
},
{
"id": "a8e20450-c256-11e7-8692-232bd1143e8a-ecs",
"name": "5:panel_5",
"type": "visualization"
}
],
"type": "dashboard",
"updated_at": "2021-08-04T16:35:59.895Z",
"version": "WzQ5ODMsMV0="
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"attributes": {
"description": "Overview of kernel executions",
"hits": 0,
"kibanaSavedObjectMeta": {
"searchSourceJSON": {
"filter": [],
"highlightAll": true,
"query": {
"language": "kuery",
"query": ""
},
"version": true
}
},
"optionsJSON": {
"darkTheme": false,
"useMargins": false
},
"panelsJSON": [
{
"embeddableConfig": {
"enhancements": {}
},
"gridData": {
"h": 12,
"i": "1",
"w": 16,
"x": 16,
"y": 0
},
"panelIndex": "1",
"panelRefName": "panel_1",
"type": "visualization",
"version": "7.3.0"
},
{
"embeddableConfig": {
"enhancements": {}
},
"gridData": {
"h": 12,
"i": "3",
"w": 16,
"x": 32,
"y": 0
},
"panelIndex": "3",
"panelRefName": "panel_3",
"type": "visualization",
"version": "7.3.0"
},
{
"embeddableConfig": {
"enhancements": {}
},
"gridData": {
"h": 12,
"i": "5",
"w": 16,
"x": 0,
"y": 0
},
"panelIndex": "5",
"panelRefName": "panel_5",
"type": "visualization",
"version": "7.3.0"
},
{
"embeddableConfig": {
"enhancements": {}
},
"gridData": {
"h": 20,
"i": "6",
"w": 48,
"x": 0,
"y": 12
},
"panelIndex": "6",
"panelRefName": "panel_6",
"type": "search",
"version": "7.3.0"
}
],
"timeRestore": false,
"title": "[Auditbeat Auditd] Executions ECS",
"version": 1
},
"coreMigrationVersion": "8.0.0",
"id": "7de391b0-c1ca-11e7-8995-936807a28b16-ecs",
"migrationVersion": {
"dashboard": "7.14.0"
},
"references": [
{
"id": "20a8e8d0-c1c8-11e7-8995-936807a28b16-ecs",
"name": "1:panel_1",
"type": "visualization"
},
{
"id": "f81a6de0-c1c1-11e7-8995-936807a28b16-ecs",
"name": "3:panel_3",
"type": "visualization"
},
{
"id": "2efac370-c1ca-11e7-8995-936807a28b16-ecs",
"name": "5:panel_5",
"type": "visualization"
},
{
"id": "d382f5b0-c1c6-11e7-8995-936807a28b16-ecs",
"name": "6:panel_6",
"type": "search"
}
],
"type": "dashboard",
"updated_at": "2021-08-04T16:35:57.797Z",
"version": "WzQ5NzAsMV0="
}

This file was deleted.

Loading

0 comments on commit 33ef1bb

Please sign in to comment.