-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 level index patterns #16917
Comments
Splunk handles this problem by allowing user variables (with defaults) within dashboards, along with end-user-facing controls to populate them. Visualizations can then optionally use/substitute those "global" dashboard variables within their assigned search string. There isn't a concept of limiting or assigning a visualization to one index - each visualization has a search string associated with it containing one or more indexes that can be populated by dashboard "global" variables. This also inherently can make creating a visualization from a search a one-click operation, optionally adding in a dashboard variable if desired. |
from @ppisljar:
|
From my thought bubble.... Have an option in viz configuration to Ideally the dashboards index-pattern UI would indicate the present value/s, and possibly allow either dashboard-wide override or per-present-value granularity. Ideally those visualizations not effected by the override would be desaturated/dimmed while the dashboards index-pattern UI is active. |
Synchronization Issues With
|
@stacey-gammon where did that quoted text come from? I'm trying to find more on "variables in expressions" but I'm not seeing any hits. fwiw @ReanimationXP's approach and experience with Splunk is exactly the solution I want. Let the dashboard be dynamic on everything, then tings like dashboard level index patterns are just an implementation detail of how someone decides to build their dashboard. |
#46908 this is the relevant issue which is still missing the details, but the idea is to add variable support to expressions, so when running your expression you can pass this variables in, and inside your expression you can use either special functions or special syntax to provide variable arguments to functions. something like
|
Quick update here: initial support for variables in expressions was added in #54788 |
Regarding the original problem @stacey-gammon described:
Data Views (née index patterns) could be composable. It can be a more powerful, yet simpler option than the creation of some special mechanism, as the user wouldn't need to learn new concepts. Such composition was one of the motivations for reimagining Data Views (search for compos... here and see this comment by @ruflin and this comment) I see references to nesting dashboards; feels like the motive is similar, though composing with Data Views is more expressive than nesting dashboards (which would represent too much coupling, and doesn't really exist in analytics anyway). Eg. can be used outside Dashboards 😄 There's no need to turn dashboards into de facto Data Views. Requires some entity relationship modeling to do it well. There are a couple of ways for including variables in Data Views. It looks sufficient. In short, a Data View can rely on, and augment, another Data View. Example:
There's no need to make Data Views exclusive to the dashboard level. For example, a bunch of charts shared on diverse dashboards may have enough commonality to warrant a common Data View. The role of Data View doesn't necessarily start at the dashboard level. The Data View is an abstraction over the physical ES indices, and
|
Just a heads up that this can also easily be done with kuery: This allows you to construct an embedded generic dashboard by following: Custom Kibana URLs for example in the URL include: |
Closing this issue in favor of #134706 as adding variable support more broadly to Embeddables would cover this use case and more! |
Based off the numerous feedback given in #3668, this issue is to dig further into a specific implementation.
What problem are we trying to solve?
A common use case is having many dashboards with the same visualizations that differ only by index pattern. This creates a scaling problem. If you have X dashboards, with N visualizations on each, a user has to create and update X * N visualizations. With a dashboard level index pattern, they would only need to maintain X dashboards which all use the same visualizations.
Current available workaround
You can achieve the same goal by using index patterns with matching prefixes. For example, if you have index patterns called
animals-*
,animals-cats-*
,animals-dogs-*
, you can create visualizations based off the shared prefix,animals-*
, and use a filter on each dashboard to segment your data.Where does this workaround fall short
I'd like to hear more from the community on this front, but one way is discoverability. It is not an obvious solution.
How could we improve on the workaround?
We could allow users to specify an index pattern at the dashboard level that will override any index patterns specified on the individual visualizations.
UI
The simplest approach would be an extra option:
Selecting an index pattern would cause it to be applied to all visualizations, instead of the index pattern chosen with it:
Challenges
This might be unintuitive or confusing since this flow still has users saving index patterns with their visualizations. I can't think of a good way to get around this since knowing the available fields is crucial when creating a visualization.
It's also possible that a visualization has fields that don't match the index pattern chosen at the dashboard level so error handling for this situation is important.
It's also possible for visualizations to use multiple index patterns. Do we replace all the index patterns with the dashboard level one or should we allow for finer grained control, like deciding which patterns to replace with which other patterns?
What's lacking
This solves the issue with needing to create and maintain duplicate visualizations, but keeping the dashboards in sync would still require duplicate actions (e.g. adding or removing a visualization for each dashboard).
This secondary problem I believe could be solved by nested dashboards.
Even if nested dashboards doesn't solve this secondary issue and we want to introduce the concept of dashboard templates in a different manner, we'll still need the ability to set dashboard level index patterns, so this is a pre-requisite step no matter what (even if the UI changes).
cc @elastic/kibana-sharing @alexfrancoeur @AlonaNadler
The text was updated successfully, but these errors were encountered: