Create Index of template

Below is my index template

post _template/sqldb_template
    {
      "template" : "sqldb-*",
      "aliases" : {
        "sqldb" : {}
      },
      "settings" : {
        "index" : {
          "number_of_shards" : 5,
          "number_of_replicas" : 0
        }
      },
      "mappings" : {
        "sqldb_size" : {
          "properties" : {
            "date" : {
              "type" : "date"
            },
            "server" : {
              "type" : "keyword"
            },
             "database" : {
              "type" : "keyword"
            },
            "logicalName" : {
              "type" : "keyword"
            },
            "fieldType" : {
              "type" : "keyword"
            },
            "usedSpace" : {
              "type" : "long"
            }
          }
        }
      }
    }

I can load data into it via this via standard curl commands. I can then see it in kibana dev tools using:

get sqldb_sqldb_size/_count 

    {
      "count": 838,
      "_shards": {
        "total": 5,
        "successful": 5,
        "skipped": 0,
        "failed": 0
      }
    }

But if i run

I get:
get sqldb/sqldb_size
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "No endpoint or operation is available at [sqldb_size]"
}
],
"type": "illegal_argument_exception",
"reason": "No endpoint or operation is available at [sqldb_size]"
},
"status": 400
}

If i add the index to kibana index patterns (It finds the date field and shows up and looks good

But if i try and discover on it says no results found?!

Any idea whats happened?

this does not look like an officially supported feature from elasticsearch, but like a third party plugin. Maybe ping the authors of the plugin and find out more.

Hi, Thanks for the reply..

Definitely not a plugin..(that i know off)

From what i understand (which could be wrong!) im trying to do "Rolling Indices"..

Steps from what i understand are:

Create a template:
indices templates

This, i think should let me create a new index if i name it starting "sqldb-" with the same mappings as the template? and all the individual indexes can be read on "sqldb" . Based on my example above.

What bit do you think is a plugin?

S

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