Change index dynamically in dashboard

Based on what I wrote on another post, I read that to dynamically reload a dashboard compared to a new index you must edit this section of the json file:

"kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"01421930-5ff7-11e8-93dd-8314717cf9ad\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"
      }

But I do not understand where I can find the id of the new index:
01421930-5ff7-11e8-93dd-8314717cf9ad

My old index is called "dev-index" and new index is called "dev-index-2".
I don't know where to find the matching id.

I don't think it should replace "01421930-5ff7-11e8-93dd-8314717cf9ad" with "dev-index-2"
So, how can I do?

Hey @Alessio_Frabotta,

Based on what I wrote on another post

Could you please point to that post to get some more context on what you're trying to accomplish? Any details will be highly appreciated.

Best,
Oleg

@azasypkin

this is the discussion I was referring to:

I see, I believe this GUID/Id is identifier of the index pattern, not index.

You can get index pattern id with the following command e.g.:

  • Kibana 6.3+: curl -s http://localhost:5601/api/saved_objects/_find?type=index-pattern | json_pp
  • Kibana 6.2: curl -s http://localhost:5601/api/saved_objects/index-pattern | json_pp (don't have 6.2 handy, so haven't checked, but let me know if it doesn't work).

Or just open required index pattern in Kibana UI and take a look at the URL - id should be there.

Best,
Oleg

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.