-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard files in .ndjson format for ELK 8.x #15
Comments
Not at all but happy to accept any changes via PR! I haven't worked on this in a long while. |
I converted the .json files to .ndjson. When trying to import any of the files in Management -> Saved Objects, I get the following error:
I am using release-7.x branch from https://github.com/deviantony/docker-elk/tree/release-7.x. Any suggestions on how to fix the same? The ui-dashboards.ndjson file (cannot attach due to unsupported file type)
|
I don't have a running version to test with, but I think we need to adjust the format/content of the ndjson to match the newer Kibana structure: {
"attributes": {
"title": "[Filebeat Postfix] Overview",
"hits": 0,
"description": "",
"panelsJSON": "…",
"optionsJSON": "…",
"version": 1,
"timeRestore": false,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "…"
}
},
"id": "b6b2aea0-788f-11e8-a41e-1930b01c3fee",
"type": "dashboard"
} |
Really appreciate you working to get things fixed up, btw. |
With release-7.x branch, I get:
Is there a way to validate the .ndjson file before trying to import the same? |
If you've got a shell with Python handy you could do something like: import json
from pathlib import Path
def validate_ndjson(file_path):
try:
# Reading and parsing each line as JSON
[json.loads(line) for line in Path(file_path).read_text().splitlines()]
return "Valid NDJSON"
except json.JSONDecodeError:
return "Invalid NDJSON"
# Validating the NDJSON file
validate_ndjson("foo.ndjson") |
I have created a PR that cleanly imports But, when I try to open
I removed the searchSourceJSON field from kibanaSavedObjectMeta key. Is this mandatory? |
Is there a latest version of the dashboard JSON files in .ndjson format that is required for ELK 8.x?
The text was updated successfully, but these errors were encountered: