What is the best practice for maintaining kibana saved objects for index-patterns and dashboards in github?
1. Do you save index-patterns and dashboards in one file?
Ex:
saved_objects.ndjson
{"type":"index-pattern", "id":"index-pattern_1"....}
{"type":"index-pattern", "id":"index-pattern_2"....}
{"type":"dashboard", "id":"dashboard_1"....}
{"type":"dashboard", "id":"dashboard_2"....}
{"type":"dashboard", "id":"dashboard_3"....}
{"type":"dashboard", "id":"dashboard_4"....}
2. Or do you save index-patterns and dashboards into individual files?
Ex:
index-pattern_1.ndjson
{"type":"index-pattern", "id":"index-pattern_1"....}
index-pattern_2.ndjson
{"type":"index-pattern", "id":"index-pattern_2"....}
dashboard_1.ndjson
{"type":"dashboard", "id":"dashboard_1"....}
dashboard_2.ndjson
{"type":"dashboard", "id":"dashboard_2"....}
dashboard_3.ndjson
{"type":"dashboard", "id":"dashboard_3"....}
dashboard_4.ndjson
{"type":"dashboard", "id":"dashboard_4"....}
I personally prefer the second method above as I if I make update to a dashboard I can simply update the individual file and I can quickly find an index-pattern or dashboard by referring to the file name. Finally it allows me to maintain a custom id better. If I want to update the id for a specific index-pattern or dashboard, I don't have to go through a bunch of json objects from one file.
3. Or you could save an index-pattern and dashboards that refer to that index-pattern into it own files.
Ex:
group_1.ndjson
{"type":"index-pattern", "id":"index-pattern_1"....}
{"type":"dashboard", "id":"dashboard_1"....}
{"type":"dashboard", "id":"dashboard_2"....}
{"type":"dashboard", "id":"dashboard_3"....}
group_2.ndjson
{"type":"index-pattern", "id":"index-pattern_2"....}
{"type":"dashboard", "id":"dashboard_4"....}
I'm curious how everyone else does it or if there are any best practices. Thanks!