I have a collection of systems collecting the same stats and (not surprisingly) I like to make a single dashboard that varies only be the system name.
In the docs for Kibana 3 I found this page: Scripted Dashboards .js
.. which looks like what I want but the top of the page says it's for an older version (3.x) and there's no corresponding page in the 4.x documentation.
Is there a new way do to this?
You're correct, Kibana 4 doesn't support scripted dashboards the way Kibana 3 did.
While it's a little more work, you could export your Dashboard(s) in Kibana 4, modify the JSON and re-import them. It might help to know how you're trying to go about applying the system name criteria to your dashboards, as there could be an easier way to do what you're trying to do.
Thanks Joe, that may work better than scripted dashboards.
The workflow thus far has been to create a query in the Discover tab with the system name for example:
sys_id: "host01-01" then save that, create the Visualisations then build a dashboard for that system. It's got obvious problems, if I add a new data field I need go create the Visualisation for all the systems and then update the dashboards.
I don't see anywhere in the Kibana interface to export a Dashboard, do I need to go under the covers and find it in a directory on the Kibana host?
It's under Settings > Objects. Dashboards are made up of references to Visualization objects, which are made up to references to Saved Search objects (which is what you create in Discover). Your best bet is probably to Export All, add/modify objects on the exported JSON data, and re-import the objects. The trick is to make sure that you export all of the "child" objects that are being referenced, otherwise the imported objects won't work, and I don't recall whether or not the exported has been fixed/made smarter to automatically include the child objects (it's worth trying yourself I guess) - Export All definitely does. It's a little cumbersome, I know, but it's an option...
if I add a new data field I need go create the Visualisation for all the systems and then update the dashboards
That should only be true if you're using those new fields in your Visualizations, and even then, you shouldn't need to create new Saved Searches - unless you're also applying filters on those new fields as well. But even then, I think you really only need to modify one or the other, and you don't need to touch the Dashboard at all, unless you're creating totally new Visualizations.
The workflow thus far has been to create a query in the Discover tab with the system name for example: sys_id: "host01-01" then save that, create the Visualisations then build a dashboard for that system.
Are all of the Visualizations and Dashboards the same, just using different Saved Searches (ie, different
sys_id's)? If so, you could just build 1 set of Visualizations and apply that query at the Dashboard level, and simply save several Dashboards with the different queries for different
sys_id's you need. That would dramatically cut down the number of Visualizations you need to maintain, and remove any need for Saved Searches (assuming that's all you're doing with them).
I found export Dashboard under "Load Dashboards -> Manage Dashboards" (and also in Settings -> Objects). After exporting a master copy of the Search, Visualisation and Dashboard JSON files I've written a script to do a string replace to convert a templates into a new instance. I've ended up with a directory of JSON snippets and I'm struggling with the curl syntax to PUT (or POST?) these back into to Elasticsearch - help!.
Another Is there a way to have some kind of selector for dashboards? It's a bit cumbersome to have to load the dash for each system, a drop down list widget would be nice.