Trying to find saved dashboard

I was under the impression that saved objects would be saved in a .kibana/ directory or index found here
/usr/share/elasticsearch/data/nodes/0/indices

But that is not the case, my kibana.yml is found here, I run kibana as a k8s pod

# Default Kibana configuration for docker target
server.name: kibana
server.host: "0"
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
monitoring.ui.container.elasticsearch.enabled: true

I have kibana running as a k8s pod, and ES running as a docker image, the saving of objects and importing/exporting works, I just can't find out where they end up in the file system, any tips?

Dashboards are in .kibana index. You can see them by running the below.

GET .kibana/_search
{
  "_source": "dashboard.title", 
  "query": {
    "match": {
      "type": "dashboard"
    }
  }
}

So I do get a result ther

"hits" : [
  {
    "_index" : ".kibana_1",
    "_type" : "_doc",
    "_id" : "dashboard:29f8c710-808b-11e9-b008-41e831b82af3",
    "_score" : 3.753418,
    "_source" : {
      "dashboard" : {
        "title" : "ErrorLogDashboard"
      }
    }
  }
]

I guess what I am asking is where is .kibana_1? How can I find this if I wanted to mount my dashboard there at deployment time. I assumed maybe it would be in here
/usr/share/elasticsearch/data/nodes/0/indices

but I'm not sure where else to look

Ahh understand. I have no idea where in the filesystem this is saved, sorry.

Can you elaborate more on what you are trying to do here?
You should not need to be interacting with the filesystem at all.

Sorry, I probably made it sound more complex. I have a very simple task, I want to mount the JSON file in the ES dockerfile or Kibana K8s at deploy time so that the user does not have to navigate to the kibana dashboard and manually "import" the dashboard JSON file. When kibana is deployed I want the dashboard to already be in the filesystem.

You need to use the API to do this, there's no way for Elasticsearch/Kibana to pull it off the filesystem.

This SO question/answer seems like what you are trying to do.

Yeah that's pretty well it, it's just that I can't find the hidden directory ".kibana" in "/usr/share/elasticsearch/data" Otherwise I'd just mount a volume there and call it a day

I assume this is possible and a very common use case but I could be wrong. I'll wait a bit and see if anyone else managed to get this solved. I have many items in my /usr/share/elasticsearch/data/nodes/0/indices directory but no saved objects as far as I can tell

It's not stored in a directory with that name, that's why. We also don't support that approach.

Your other option is to take a snapshot of that index and then restore it in the new cluster.

Ah interesting, that's good to know. I'll dig more into this on Monday, thanks for the help

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