# Not able to create index pattern in 6.2.2

**URL:** https://discuss.elastic.co/t/not-able-to-create-index-pattern-in-6-2-2/121403
**Category:** Kibana
**Created:** [February 25, 2018, 7:12pm UTC](https://discuss.elastic.co/t/not-able-to-create-index-pattern-in-6-2-2/121403 "2018-02-25T19:12:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Arnaud\_Jaspart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arnaud_jaspart/32/25219_2.png) [@Arnaud\_Jaspart](https://discuss.elastic.co/u/Arnaud_Jaspart)
#### Post date: [February 25, 2018, 7:12pm UTC](https://discuss.elastic.co/t/not-able-to-create-index-pattern-in-6-2-2/121403/1 "2018-02-25T19:12:43Z")

</div>

Hello Kibana team,

Even after following index creation documentations (link provided on kibana interface and on the web) I'm not able to access the ES data on kibana. I keep having "Warning No default index pattern. You must select or create one to continue.".  
FYI, I didn't that much trouble starting indexing and visualizing in 6.0, if it can help.

`GET /_cat/indices?v`

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open logstash-jobs nHtULW65QWistGDCmqTUOA 5 1 2033 0 2.9mb 2.9mb
yellow open metricbeat-6.2.2-2018.02.25 asLt2TcaR4e09Sg14G_Lrg 1 1 79231 0 13.3mb 13.3mb
yellow open bank 95IoLJkIQyG8ulWsPGardQ 5 1 1000 0 475.2kb 475.2kb
green open .kibana _lCtMjcKTa-kq9UDhfAJpw 1 0 1 0 3.7kb 3.7kb
yellow open logstash-2013.12.11 5pd7IExpSmyNpUXKWGmiUQ 5 1 1 0 12.5kb 12.5kb
yellow open logstash-2015.05.18 x3S3XIDsTYeMjzT3eVHy6w 5 1 4631 0 21mb 21mb
yellow open metricbeat-6.2.2-2018.02.23 HYNnU_WLQzSBG71PehYLZw 1 1 33768 0 5.9mb 5.9mb
yellow open logstash-2015.05.20 4hLt-qsgQP2rvHOGY5CMqw 5 1 4750 0 21mb 21mb
yellow open logstash-2011.05.18 c3C9mCqSTIClbi957jP1Kg 5 1 2 0 26.4kb 26.4kb
yellow open metricbeat-6.2.2-2018.02.24 uw4NdzCTRFOxhsXROeZvrA 1 1 137924 0 22.9mb 22.9mb
yellow open logstash-2011.05.19 cX3Co3AgQa6jiuJTU-CyTg 5 1 1 0 13.8kb 13.8kb
yellow open shakespeare WV0rqPgmTM6f8G9E1lTl5g 5 1 111396 0 21.3mb 21.3mb
yellow open logstash-2015.05.19 98m0utEBTFWWvuLY3IadPg 5 1 4624 0 21.1mb 21.1mb

```

I create a logstash-jobs such as:

```auto
PUT /logstash-jobs
{
 "mappings": {
  "doc": {
	"properties" : {
		"@id" : { "type" : "integer"},
		"@title" : { "type" : "text"},
		"@description" : { "type" : "text"},
		"@company" : { "type" : "text"},
		"@city" : { "type" : "text"},
		"@state" : { "type" : "text"},
		"@salary" : { "type" : "text"},
		"@duration" : { "type" : "text"},
		"@link" : { "type" : "text"},
		"@provider" : { "type" : "text"},
		"@update" : { "type" : "date", "format": "yyyy-MM-dd HH:mm:ss"}
	}
  }
 }
}

```

Some configuration parameters:

```auto
indexPattern:placeholder = logstash-*
timelion:es.timefield = @timestamp
timelion:es.default_index = _all

```

I'm not sure how to investigate this from there.  
Feel free to ask me for logs, actions, results, ...

Thank you very much for your help  
Best regards  
Arnaud

_Kibana version:_ 6.2.2  
_Elasticsearch version:_ 6.2.2  
_Server OS version:_ Centos7  
Linux [Elastic.newfrontierdata.com](http://Elastic.newfrontierdata.com) 3.10.0-693.11.6.el7.x86\_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86\_64 x86\_64 x86\_64 GNU/Linux  
_Browser version:_ Firefox 58.0.2 (64-bit)  
_Browser OS version:_ Windows 10  
_Original install method (e.g. download page, yum, from source, etc.):_  
Extracted .tar.gz for ELK 6.2.2  
_Description of the problem including expected versus actual behavior:_

_Steps to reproduce:_

- Connect to kibana
- Run GET /\_cat/indices?v in console : success
- Navigate to Management/Index patterns : see " Couldn't find any Elasticsearch data
- You'll need to index some data into Elasticsearch before you can create an index pattern. Learn how.  
"

_Errors in browser console (if relevant):_  
Couldn't find any Elasticsearch data  
You'll need to index some data into Elasticsearch before you can create an index pattern. Learn how.

_Provide logs and/or server output (if relevant):_  
No errors/warnings

---

<div class="post-metadata">

### Author: ![Arnaud\_Jaspart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arnaud_jaspart/32/25219_2.png) [@Arnaud\_Jaspart](https://discuss.elastic.co/u/Arnaud_Jaspart)
#### Post date: [February 25, 2018, 7:18pm UTC](https://discuss.elastic.co/t/not-able-to-create-index-pattern-in-6-2-2/121403/2 "2018-02-25T19:18:16Z")

</div>

In fact, I could find a fix for indexing, but still didn't reach a stable situation.  
Running:

```auto
POST /.kibana/doc/index-pattern:logstash-jobs
{
  "type": "index-pattern",
  "index-pattern": {
    "title": "logstash-jobs",
    "timeFieldName": "update"
  }
}

```

displayed the index in the index pattern list. I still don't see the others, can you tell me why? do I have to manually add all the index patterns manually?  
Another issue is, why I try to display any charts on this dataset, the dataset "seems" empty.  
For example a blank map when I try to count by state, or even more informative, a metric with a global count is "0 count".

Something is wrong with the mapping or something... Can you orient me to the right direction?

Thank you very much  
Best regards  
Arnaud

---

<div class="post-metadata">

### Author: ![Arnaud\_Jaspart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arnaud_jaspart/32/25219_2.png) [@Arnaud\_Jaspart](https://discuss.elastic.co/u/Arnaud_Jaspart)
#### Post date: [February 25, 2018, 10:07pm UTC](https://discuss.elastic.co/t/not-able-to-create-index-pattern-in-6-2-2/121403/3 "2018-02-25T22:07:48Z")

</div>

More info:  
I did a search: `GET /logstash-jobs3/_search`. The data is not being displayed in the charts, could it be due to the fact that the data is contained in a `"_source": {}` tag?

```auto
{
  "took": 1,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 2033,
    "max_score": 1,
    "hits": [
      {
        "_index": "logstash-jobs3",
        "_type": "doc",
        "_id": "BRvOzmEB4Eh7pShpbcAB",
        "_score": 1,
        "_source": {
          "@timestamp": "2018-02-25T21:11:29.415Z",
          "id": "7",
          "@version": "1",
          "city": "Fayetteville",
          "path": "/home/elastic/logstash-6.2.2/config/file.csv",
          "title": "Title of the post",
          "host": "Elastic.newfrontierdata.com",
          "state": "AR",
          "duration": "22 days ago",
          "update": "2017-12-03 07:00:02",
          "description": "Here is some description of the post... [...]",

```

Thank you

---

<div class="post-metadata">

### Author: ![Arnaud\_Jaspart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arnaud_jaspart/32/25219_2.png) [@Arnaud\_Jaspart](https://discuss.elastic.co/u/Arnaud_Jaspart)
#### Post date: [February 25, 2018, 11:14pm UTC](https://discuss.elastic.co/t/not-able-to-create-index-pattern-in-6-2-2/121403/4 "2018-02-25T23:14:59Z")

</div>

Ok,

I worked around the "no-data" in visualization (0 counts) by transforming the data into json using that script:

```auto
import csv
import json

csvfile = open('jobs.csv', 'r')
jsonfile = open('jobs.json', 'w')

fieldnames = ("id", "title", "description", "company", "city", "state", "salary", "duration", "link", "provider", "update")
reader = csv.DictReader( csvfile, fieldnames)
for row in reader:
    json.dump(row, jsonfile)
    jsonfile.write('\n')

```

and then by running: `sed -e 's/^/{ "index" : {} }\n/' -i jobs.json`

Then, I changed the types of the fields I wanted aggregated to `keyword` (another issue I had, which I fixed easily.)

I finally ran the following command:  
`curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/aja-jobs/doc/_bulk?pretty' --data-binary @jobs.json`

and that's it. it's working now.

I don;t want to do that for the future dataset. Can you tell me what's wrong with my logstash configuration?  
_jobs.yml_

```auto
cat jobs.yml
input {
        file {
                path => "/home/elastic/logstash-6.2.2/config/jobs.csv"
                start_position => "beginning"
                sincedb_path => "/dev/null"
        }
}
filter {
        csv {
                separator => ","
                columns => ["id", "title", "description", "company", "city", "state", "salary", "duration", "link", "provider", "update"]
  }
}
output {
        elasticsearch {
                hosts => "http://localhost:9200"
                index => "nfd-jobs"
                template => "/home/elastic/logstash-6.2.2/config/jobs.template.json"
        }
        stdout {}
}

```

_jobs.template.json_

```auto
{
        "template": "jobs",
        "settings" : {
                "number_of_shards" : 1,
                "number_of_replicas" : 1,
                "index" : {
                        "query" : { "default_field" : "id" }
                }
        },
        "mappings": {
                "_default_": {
                        "_all": { "enabled": false },
                        "_source": { "compress": true },
                        "dynamic_templates": [
                                {
                                        "text_template" : {
                                                "match" : "*",
                                                "mapping": { "type": "text", "index": "not_analyzed" },
                                                "match_mapping_type" : "text"
                                         }
                                }
                        ],
                        "properties" : {
                                "id" : { "type" : "integer"},
                                "title" : { "type" : "keyword"},
                                "description" : { "type" : "text"},
                                "company" : { "type" : "keyword"},
                                "city" : { "type" : "keyword"},
                                "state" : { "type" : "keyword"},
                                "salary" : { "type" : "text"},
                                "duration" : { "type" : "text"},
                                "link" : { "type" : "text"},
                                "provider" : { "type" : "keyword"},
                                "@update" : { "type" : "date", "format": "yyyy-MM-dd HH:mm:ss"}
                        }
                }
        }
}

```

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [February 27, 2018, 6:37pm UTC](https://discuss.elastic.co/t/not-able-to-create-index-pattern-in-6-2-2/121403/5 "2018-02-27T18:37:44Z")

</div>

You shouldn't need to manually post to the Kibana index, in-fact I would highly advise against it. On the index pattern creation page, have you tried adding an index pattern? If so, what pattern are you attempting to add?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 27, 2018, 6:37pm UTC](https://discuss.elastic.co/t/not-able-to-create-index-pattern-in-6-2-2/121403/6 "2018-03-27T18:37:47Z")

</div>

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