-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Custom beat: Cannot export and re-import dashboard. Missing steps? #8200
Comments
Could you check the content of your dashboard file inside |
It does contain JSON but looks like a completely different file. If I diff the export in Interestingly, if I export the dashboard with:
Then wipe my
I get the following error:
|
Okay I did some more digging, and it looks like the
It's the same JSON response, but the |
Alright, it looks like this line is the culprit. Catching the error thrown by json.Unmarshal produces:
Indeed the |
@joshuar Thanks for digging into the code here directly. Any chance you could send me an email with the dashboard file that is exported when you run |
Okay scratch that last comment (deleted it) as that was with a broken dashboard. So I just recreated a new dashboard in Kibana, saved it, then ran the export command above. Here is the JSON export: |
@ycombinator Could you have a look at this one? |
Yep, I got it. |
Hello there, facing a similar problem. Having exported a Kibana dashboard with: go run vendor/github.com/elastic/beats/dev-tools/cmd/dashboards/export_dashboards.go -dashboard 79a7d0e0-a755-11e8-8251-ff8bb68f52ef -output /kibana/6/dashboard/mydashboard.json I'm not able to import with: ./custombeat -v -e -d "*" setup -E setup.dashboards.enabled=true The error I get is: failed to parse [visualization.uiStateJSON]. Response: {"objects":[{"id":"12fe0dc0-0374-11e9-980d-c5ba02cd266a","type":"visualization","error":{"message":"failed to parse [visualization.uiStateJSON]"}},{"id":"70f41ec0-0373-11e9-980d-c5ba02cd266a","type":"visualization","error":{"message":"failed to parse... (truncated) So comparing my json file with the one @joshuar uploaded I find that beats/libbeat/dashboards/decode.go Line 30 in 1ed8e32
So I'm wondering if this is something expected, or there is an incompatibility, bug, or problematic behavior. cc: @ycombinator |
Hey @ChrsMark, what version/branch are you developing your custom beat from? |
Hello @ycombinator, here is the info: chrismark@chrismark-dev:~/go-home/src/github.com/nfvsap/natsbeat$ (cd ../../elastic/beats/ && git log -1 --decorate)
commit 6c88537d3a1e925abfd57a043563d90b3acb27b0 (HEAD -> master, origin/master, origin/HEAD)
Author: Andrew Kroh <-->
Date: Tue Dec 18 01:39:33 2018 -0500
Update auditbeat.reference.yml (#9606)
|
I think #9097 solved this issue with the added |
Backlog grooming: Closing it for now until further activity, can still be reopened if needed. |
Hey all,
I'm developing a custom beat against the 6.4 branch. I'm following the beats developer guide. My problem is with the export/import of dashboards.
So I have a clean Elasticsearch/Kibana running from the official Docker images. I'll use my beat to index data into ES and then build out some visualisations and a dashboard in KB. Then I go to export the dashboard to include it in my beat with:
I believe
_meta/kibana/6/dashboard/
is the correct location for these dashboards.I then wipe my Elasticsearch clean (i.e,
curl -XDELETE localhost:9200/_all
), logout and log back into Kibana so it recreates its index with its OOTB defaults.I then run
make update
in my beat which seems to create a_meta/kibana.generated/6
directory which contains both the dashboard and index pattern.I'll then re-run the setup of my beat and specify this directory with
./mybeat -d "*" -e setup -E "setup.dashboards.directory=_meta/kibana.generated"
, which seems to load the index pattern and dashboards/visualisations correctly.Then run my beat to re-generate my data and then try to view my imported dashboard. But then I get:
The visualisations themselves work individually, but the dashboard seems to be broken. I have to recreate the dashboard from scratch. The time is borked and no visualisations are displayed. I have to delete this dashboard object and re-create with the visualisations.
Is this a know problem? Or am I missing some step here?
The text was updated successfully, but these errors were encountered: