Shortened URL added to .kibana


(Lantern77) #1

This is a very specific issue however, in our kibana.yml we changed the index in kibana to "ui-kibana"

 #Kibana uses an index in Elasticsearch to store saved searches, visualizations
 # and dashboards. It will create a new index if it doesn't already exist.
 kibana.index: "ui-kibana"

However, is there a reason why shortened url's are still saved in .kibana when they are made, instead of our set ui-kibana?

Request in Sense
> GET .kibana/_search
> {
> "query": {
> "match_all": {}
> }
> }

Response:

   {
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
  },
  "hits": {
    "total": 1,
    "max_score": 1,
    "hits": [
      {
        "_index": ".kibana",
        "_type": "url",
        "_id": "fca5ab8fa377aaa44bc1a3f909b1a633",
        "_score": 1,
        "_source": {
          "url": "/app/kibana#/dashboard/.kibanaTest?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-15m,mode:quick,to:now))",
          "accessCount": 0,
          "createDate": "2016-03-09T14:01:40.392Z",
          "accessDate": "2016-03-09T14:01:40.392Z"
        }
      }
    ]
  }

(Lantern77) #2

So I have taken a look at the source code for kibana, and at the moment it is hard-coded to the .kibana index.

exports['default'] = function (server) {
  function updateMetadata(urlId, urlDoc) {
    var client;
    return _regeneratorRuntime.async(function updateMetadata$(context$2$0) {
      while (1) switch (context$2$0.prev = context$2$0.next) {
        case 0:
          client = server.plugins.elasticsearch.client;
          context$2$0.prev = 1;
          context$2$0.next = 4;
          return _regeneratorRuntime.awrap(client.update({
            index: '.kibana',
            type: 'url',
            id: urlId,
            body: {
              doc: {
                'accessDate': new Date(),
                'accessCount': urlDoc._source.accessCount + 1
              }
            }
          }));

short_url_lookup.js

I know this is a very small issue is there ever a plan though to link it to the settings in kibana.yml??


(Wil) #3

you can change the index: '.kibana' to the following
index: server.config().get('kibana.index')


(Lantern77) #4

Thanks


(Matt Bargar) #5

I've created a ticket for this on the Kibana repo: https://github.com/elastic/kibana/issues/6489

Thanks for reporting it!


(system) #6