# Sample project

**URL:** https://discuss.elastic.co/t/sample-project/147945
**Category:** Logstash
**Created:** [September 10, 2018, 11:06am UTC](https://discuss.elastic.co/t/sample-project/147945 "2018-09-10T11:06:21Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Sripal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sripal/32/36704_2.png) [@Sripal](https://discuss.elastic.co/u/Sripal)
#### Post date: [September 10, 2018, 11:06am UTC](https://discuss.elastic.co/t/sample-project/147945/1 "2018-09-10T11:06:21Z")

</div>

Hi All,

I am unable to add any json file into my elasticsearch. kindly help me no datas are reflecting to kibana.

my logstash config file:  
input{  
file{  
path =\> "D:\ELK-6.4\logs.jsonl\FL\_insurance\_sample.csv"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/nul"  
}  
}  
filter{  
csv{  
separator =\> ","  
columns =\>["Cust\_ID","Cust\_Fname","Cust\_Lname","Cust\_Email","Cust\_City","Cust\_Type"]  
}  
mutate{convert =\> ["Cust\_ID","integer"]}  
}  
output{  
elasticsearch{  
hosts =\> "localhost"  
index =\> "customers"  
document\_type =\> "US\_Based\_Cust"  
}  
stdout{}

```
 }

```

Output :  
D:\ELK-6.4\logstash-6.4.0\bin\>logstash -f D:\ELK-6.4\logstash-6.4.0\config\logstash-sample.conf  
Sending Logstash logs to D:/ELK-6.4/logstash-6.4.0/logs which is now configured via log4j2.properties  
[2018-09-10T16:36:38,258][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2018-09-10T16:36:39,127][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"6.4.0"}  
[2018-09-10T16:36:41,522][WARN][logstash.outputs.elasticsearch] You are using a deprecated config setting "document\_type" set in elasticsearch. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. Document types are being deprecated in Elasticsearch 6.0, and removed entirely in 7.0. You should avoid this feature If you have any questions about this, please visit the #logstash channel on freenode irc. {:name=\>"document\_type", :plugin=\>\<LogStash::Outputs::ElasticSearch index=\>"customers", id=\>"4ba64e70f42580f567145d66b0aa54a5509102dbd46464292b1f15b83c629fce", hosts=\>[[//localhost](https://localhost)], document\_type=\>"US\_Based\_Cust", enable\_metric=\>true, codec=\>\<LogStash::Codecs::Plain id=\>"plain\_55988f44-8684-4a6c-b88b-6c24b6a6aba9", enable\_metric=\>true, charset=\>"UTF-8"\>, workers=\>1, manage\_template=\>true, template\_name=\>"logstash", template\_overwrite=\>false, doc\_as\_upsert=\>false, script\_type=\>"inline", script\_lang=\>"painless", script\_var\_name=\>"event", scripted\_upsert=\>false, retry\_initial\_interval=\>2, retry\_max\_interval=\>64, retry\_on\_conflict=\>1, action=\>"index", ssl\_certificate\_verification=\>true, sniffing=\>false, sniffing\_delay=\>5, timeout=\>60, pool\_max=\>1000, pool\_max\_per\_route=\>100, resurrect\_delay=\>5, validate\_after\_inactivity=\>10000, http\_compression=\>false\>}  
[2018-09-10T16:36:42,897][INFO][logstash.pipeline] Starting pipeline {:pipeline\_id=\>"main", "pipeline.workers"=\>8, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>50}  
[2018-09-10T16:36:43,249][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=\>{:removed=\>[], :added=\>[[http://localhost:9200/](http://localhost:9200/)]}}  
[2018-09-10T16:36:43,257][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://localhost:9200/](http://localhost:9200/), :path=\>"/"}  
[2018-09-10T16:36:43,384][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=\>"[http://localhost:9200/](http://localhost:9200/)"}  
[2018-09-10T16:36:43,427][INFO][logstash.outputs.elasticsearch] ES Output version determined {:es\_version=\>6}  
[2018-09-10T16:36:43,432][WARN][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document \_type {:es\_version=\>6}  
[2018-09-10T16:36:43,459][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=\>"LogStash::Outputs::ElasticSearch", :hosts=\>["[//localhost](https://localhost)"]}  
[2018-09-10T16:36:43,481][INFO][logstash.outputs.elasticsearch] Using mapping template from {:path=\>nil}  
[2018-09-10T16:36:43,499][INFO][logstash.outputs.elasticsearch] Attempting to install template {:manage\_template=\>{"template"=\>"logstash-_", "version"=\>60001, "settings"=\>{"index.refresh\_interval"=\>"5s"}, "mappings"=\>{"default"=\>{"dynamic\_templates"=\>[{"message\_field"=\>{"path\_match"=\>"message", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false}}}, {"string\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false, "fields"=\>{"keyword"=\>{"type"=\>"keyword", "ignore\_above"=\>256}}}}}], "properties"=\>{"@timestamp"=\>{"type"=\>"date"}, "@version"=\>{"type"=\>"keyword"}, "geoip"=\>{"dynamic"=\>true, "properties"=\>{"ip"=\>{"type"=\>"ip"}, "location"=\>{"type"=\>"geo\_point"}, "latitude"=\>{"type"=\>"half\_float"}, "longitude"=\>{"type"=\>"half\_float"}}}}}}}}  
[2018-09-10T16:36:43,887][INFO][logstash.pipeline] Pipeline started successfully {:pipeline\_id=\>"main", :thread=\>"#\<Thread:0x1d3d66ec run\>"}  
[2018-09-10T16:36:43,953][INFO][logstash.agent] Pipelines running {:count=\>1, :running\_pipelines=\>[:main], :non\_running\_pipelines=\>[]}  
[2018-09-10T16:36:43,974][INFO][filewatch.observingtail] START, creating Discoverer, Watch with file and sincedb collections  
[2018-09-10T16:36:44,285][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}

Kindly anyone help me.

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 10, 2018, 11:11am UTC](https://discuss.elastic.co/t/sample-project/147945/2 "2018-09-10T11:11:04Z")

</div>

> sincedb\_path =\> "/dev/nul"

On Windows use "nul", not "/dev/nul".

> document\_type =\> "US\_Based\_Cust"

Index names must be lowercase only.

---

<div class="post-metadata">

### Author: ![Sripal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sripal/32/36704_2.png) [@Sripal](https://discuss.elastic.co/u/Sripal)
#### Post date: [September 24, 2018, 7:24am UTC](https://discuss.elastic.co/t/sample-project/147945/3 "2018-09-24T07:24:52Z")

</div>

Thanks for quick response.  
I've changed the conf as per your comments:  
input{  
file{  
path =\> "D:\ELK-6.4\logs.jsonl\FL\_insurance\FL\_insurance\_sample.csv"  
start\_position =\> "beginning"  
sincedb\_path =\> "nul"  
}  
}  
filter{  
csv{  
separator =\> ","  
columns =\>["Cust\_ID","Cust\_Fname","Cust\_Lname","Cust\_Email","Cust\_City","Cust\_Type"]  
}  
mutate{convert =\> ["Cust\_ID","integer"]}  
}  
output{  
elasticsearch{  
hosts =\> "localhost"  
index =\> "customers"  
document\_type =\> "us\_based\_customer"  
}  
stdout{}

}  
OUTPUT is:  
D:\ELK-6.4\logstash-6.4.0\bin\>logstash -f apache\_logstash.conf  
Sending Logstash logs to D:/ELK-6.4/logstash-6.4.0/logs which is now configured via log4j2.properties  
[2018-09-24T12:54:10,321][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2018-09-24T12:54:10,757][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"6.4.0"}  
[2018-09-24T12:54:12,632][WARN][logstash.outputs.elasticsearch] You are using a deprecated config setting "document\_type" set in elasticsearch. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. Document types are being deprecated in Elasticsearch 6.0, and removed entirely in 7.0. You should avoid this feature If you have any questions about this, please visit the #logstash channel on freenode irc. {:name=\>"document\_type", :plugin=\>\<LogStash::Outputs::ElasticSearch index=\>"customers", id=\>"568bf95facfde7036131f90f2332ec269412ad64f88084fe77c0c8e21d6b6a4c", hosts=\>[[//localhost](https://localhost)], document\_type=\>"us\_based\_customer", enable\_metric=\>true, codec=\>\<LogStash::Codecs::Plain id=\>"plain\_807cf569-a7cb-481d-bb15-e173baec3840", enable\_metric=\>true, charset=\>"UTF-8"\>, workers=\>1, manage\_template=\>true, template\_name=\>"logstash", template\_overwrite=\>false, doc\_as\_upsert=\>false, script\_type=\>"inline", script\_lang=\>"painless", script\_var\_name=\>"event", scripted\_upsert=\>false, retry\_initial\_interval=\>2, retry\_max\_interval=\>64, retry\_on\_conflict=\>1, action=\>"index", ssl\_certificate\_verification=\>true, sniffing=\>false, sniffing\_delay=\>5, timeout=\>60, pool\_max=\>1000, pool\_max\_per\_route=\>100, resurrect\_delay=\>5, validate\_after\_inactivity=\>10000, http\_compression=\>false\>}  
[2018-09-24T12:54:13,898][INFO][logstash.pipeline] Starting pipeline {:pipeline\_id=\>"main", "pipeline.workers"=\>8, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>50}  
[2018-09-24T12:54:14,243][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=\>{:removed=\>, :added=\>[[http://localhost:9200/](http://localhost:9200/)]}}  
[2018-09-24T12:54:14,258][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://localhost:9200/](http://localhost:9200/), :path=\>"/"}  
[2018-09-24T12:54:14,383][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=\>"[http://localhost:9200/](http://localhost:9200/)"}  
[2018-09-24T12:54:14,419][INFO][logstash.outputs.elasticsearch] ES Output version determined {:es\_version=\>6}  
[2018-09-24T12:54:14,419][WARN][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document \_type {:es\_version=\>6}  
[2018-09-24T12:54:14,451][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=\>"LogStash::Outputs::ElasticSearch", :hosts=\>["[//localhost](https://localhost)"]}  
[2018-09-24T12:54:14,476][INFO][logstash.outputs.elasticsearch] Using mapping template from {:path=\>nil}  
[2018-09-24T12:54:14,492][INFO][logstash.outputs.elasticsearch] Attempting to install template {:manage\_template=\>{"template"=\>"logstash-_", "version"=\>60001, "settings"=\>{"index.refresh\_interval"=\>"5s"}, "mappings"=\>{"default"=\>{"dynamic\_templates"=\>[{"message\_field"=\>{"path\_match"=\>"message", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false}}}, {"string\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false, "fields"=\>{"keyword"=\>{"type"=\>"keyword", "ignore\_above"=\>256}}}}}], "properties"=\>{"@timestamp"=\>{"type"=\>"date"}, "@version"=\>{"type"=\>"keyword"}, "geoip"=\>{"dynamic"=\>true, "properties"=\>{"ip"=\>{"type"=\>"ip"}, "location"=\>{"type"=\>"geo\_point"}, "latitude"=\>{"type"=\>"half\_float"}, "longitude"=\>{"type"=\>"half\_float"}}}}}}}}  
[2018-09-24T12:54:14,836][INFO][logstash.pipeline] Pipeline started successfully {:pipeline\_id=\>"main", :thread=\>"#\<Thread:0x690d3714 sleep\>"}  
[2018-09-24T12:54:14,882][INFO][logstash.agent] Pipelines running {:count=\>1, :running\_pipelines=\>[:main], :non\_running\_pipelines=\>}  
[2018-09-24T12:54:14,898][INFO][filewatch.observingtail] START, creating Discoverer, Watch with file and sincedb collections  
[2018-09-24T12:54:15,117][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}

Kibna:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/e/eecf8bef04edbb5a3c97f52e4dd0f4ddf9bd8f04.png)

---

<div class="post-metadata">

### Author: ![Sripal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sripal/32/36704_2.png) [@Sripal](https://discuss.elastic.co/u/Sripal)
#### Post date: [September 24, 2018, 7:26am UTC](https://discuss.elastic.co/t/sample-project/147945/4 "2018-09-24T07:26:15Z")

</div>

Hi, can you please anybody give me any sample project flow.

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 24, 2018, 8:10am UTC](https://discuss.elastic.co/t/sample-project/147945/5 "2018-09-24T08:10:59Z")

</div>

It's not clear to me what the problem is.

Note that Kibana is looking at data from indexes matching customer\* but you've configured Logstash to write to the us\_based\_customer index.

---

<div class="post-metadata">

### Author: ![Sripal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sripal/32/36704_2.png) [@Sripal](https://discuss.elastic.co/u/Sripal)
#### Post date: [September 24, 2018, 9:09am UTC](https://discuss.elastic.co/t/sample-project/147945/6 "2018-09-24T09:09:59Z")

</div>

Thanks for your reply.

---

<div class="post-metadata">

### Author: ![Sripal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sripal/32/36704_2.png) [@Sripal](https://discuss.elastic.co/u/Sripal)
#### Post date: [October 5, 2018, 10:57am UTC](https://discuss.elastic.co/t/sample-project/147945/7 "2018-10-05T10:57:50Z")

</div>

> [@Sripal](#):
>
> document\_type =\> "us\_based\_customer"

I removed the "document\_type" and "sincedb\_path" and its working fine.

I am able to view the records in Kibana.

---

<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: [November 2, 2018, 11:07am UTC](https://discuss.elastic.co/t/sample-project/147945/8 "2018-11-02T11:07:55Z")

</div>

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