-
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
Exporting and importing dashboards with index pattern IDs #10117
Comments
You can explicitly set ids when you create an index pattern. The option is hidden behind an "advanced" toggle. |
(Somebody on the Beats team please correct me if I'm wrong) So I don't think that we create index patterns in the Beats, at least I don't see where just now. We create index mapping templates and then import dashboards. I guess now we might have to create index patterns as well? All this is automated (user just runs @ruflin or @andrewkroh - you probably know better what we do? |
So I've done a bit more research. The premise of all this is that we want to make it simple for users to get started with any Beat. To that end, each Beat ships with an index pattern and one or (usually) more dashboards. The way it currently works we get these two objects like this:
Users can then use the By default, With Maybe this could be addressed by defaulting I tried setting |
Mistake in my setup, setting |
What happened is that I set up the index pattern manually (causing it to have a random ID) and set up a dashboard on top of it. If I had used the generated index pattern all would have been fine. Closing this. |
Only this week I have seen two reports caused by this:
Was this already changed in Kibana 6.6? I wonder if we can do something to improve the experience here. |
At some point, Kibana changed how it exports dashboards (see comments here and here). Where previously, the export would contain a
searchSourceJSON
like this:It is now (7.0 at least):
index
is the ID of the Kibana index pattern object, so different for each instance.This presents us with a problem when distributing dashboards with our Beats. Where previously we could just rely on e.g. the
packetbeat-*
index pattern to be present already when importing a dashboard and used automatically, with IDs this does not work anymore. We don't know the existing IDs, and we don't want to import a new index pattern every time we import a dashboard.Some options:
index
field with the pattern. I'm not sure how long that would work though, I assume at some point Kibana might want to deprecate/remove specifying the search pattern in that field.packetbeat-*
) and then overwrite theindex
field with that. To find the index pattern ID we could probably useGET /api/saved_objects/_find
.I like 2 because it's a longer term solution, but I did want to see if there are other opinions, and maybe if somebody from the Kibana team can confirm if this is the way to go.
/cc @sayden @ruflin @jsoriano - since you hit this as well in #10076
/cc @elastic/kibana-platform - I see you're working on some improvements to the APIs in elastic/kibana#27203, but from what I see it has more to do with automatically including and resolving dependencies and wouldn't help here. In any case, I'd be curious on your opinion of how we should handle this.
The text was updated successfully, but these errors were encountered: