(I will bold my questions hereafter, so that they are easy to notice)
Thanks, what I did was indeed creating some new visualizations, exporting them, inspecting the ndjson, finding the reference
field(s), copying the content and pasting inside the reference
array (as suggested in the managing-saved-objects-in-kibana-7.7 guide) in the edit object view in Kibana. Much like what is suggested in change-visualization-index-under-saved-objects.
Modifying the index
field under kibanaSavedObjectMeta.searchSourceJSON as suggested in visualizations-broken-after-deleting-index-pattern-resolved-the-index-pattern-associated-with-this-object-no-longer-exists is something which apparently is valid for kibana 6.8, judging by the part at the end in the guide managing-saved-objects-in-kibana-6.8.
However I still had to put my index's uuid in the reference
, which visualizations-broken-after-deleting-index-pattern-resolved-the-index-pattern-associated-with-this-object-no-longer-exists suggests to take from the link to the index page under index management in kibana.
My problem was that I didn't have a simple single-object and easy-to-guess reference that could be solved just with a new index uuid. For example, I had a Control kind of visualization that required 3 entries in the reference
array, each with a custom name. And I couldn't have guessed the exact required structure and naming just by looking at what is provided in the Edit Visualization view (Saved Objects > Inspect) alone, since when I edit objects (also valid and new ones!) from there, the reference
entry is always empty.
I don't see why it should be like that, since when one then goes the more laborious way of downloading the export.ndarray
, the reference
can be found.
Why isn't all the information present in Kibana's view for editing objects?
Anyway, my question remains:
is there a way of debugging such issues?
Unfortunately, when a visualization is broken, it just doesn't show up (can't be visualized), and it does so silently. Even the guide managing-saved-objects-in-kibana-7.7 warns you at the end about the fact that even a little change might render the visualization unusable, and that manual editing should be avoided:
Validation is not performed for object properties. Submitting an invalid change will render the object unusable.
But what about the cases when I must edit manually? Is there a way to discover if it's a wrong type in one field, if it's wrong syntax, if it's a missing index's uuid, or wrong number of entries or format in the reference or in other fields?
And a final question related to this topic, which I ask in advance so that it won't bite me:
if I now introduce index aliases (I need rollover on my index), or change index name or index pattern name, or I change some field's meta-information (like index
or type
or keyword
), what's the correct and cleanest way of propagating this change to my visualizations?
Can I do something in advance? (For example, I don't see any button or field to change the index pattern when I edit a visualization in the proper "UI" way)
Or will I have to go through this process of blind trial and error via manual editing of the saved object? (Now I know how to do it but it's a bit time consuming and error-prone).
Thanks for your support and thank you again for your quick answers!