# Not able to create /see any indexs in elasticsearch

**URL:** <https://discuss.elastic.co/t/not-able-to-create-see-any-indexs-in-elasticsearch/152524>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 15, 2018, 3:24pm UTC](https://discuss.elastic.co/t/not-able-to-create-see-any-indexs-in-elasticsearch/152524 "2018-10-15T15:24:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob\_ve](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@bob\_ve](https://discuss.elastic.co/u/bob_ve)\
**Post date:** [October 15, 2018, 3:24pm UTC](https://discuss.elastic.co/t/not-able-to-create-see-any-indexs-in-elasticsearch/152524/1 "2018-10-15T15:24:41Z")

</div>

I was not able to see any data or any indexs in elasticsearch . I was using filebeat --\> logstash --\> elasticsearch

## **filebeat.yml**

filebeat.inputs:

-\> type: log

> paths:
> 
> - /var/log/hadoop/hadoop/hive/gc.log\*  
> document\_type: hivemetastore
> 
> - type: logpaths:
> - /var/log/hadoop/hadoop/hdfs/gc.log\*  
> document\_type: hdfs

**logstash.conf**

input {  
beats {  
port =\> 5044  
}  
}

output{

if [document\_type] == "hdfs" {  
elasticsearch {  
hosts =\> ["endpoint:443"]  
action =\> "index"  
index =\> "hdfs"  
}  
}

if [document\_type] == "hivemetastore" {  
elasticsearch {  
hosts =\> ["endpoint:443"]  
action =\> "index"  
index =\> "hive"  
}  
}

}

I'm not sure where i was doing wrong. without if condition i was able to see logs.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [October 16, 2018, 9:17pm UTC](https://discuss.elastic.co/t/not-able-to-create-see-any-indexs-in-elasticsearch/152524/2 "2018-10-16T21:17:38Z")

</div>

I don't think filebeat has any field named `document_type`. That's why the conditions fail. If you insist on `document_type`, you can configure filebeat this way:

```auto
paths:
- /var/log/hadoop/hadoop/hive/gc.log*
fields.document_type: hivemetastore
fields_under_root: true

```

---

<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 13, 2018, 9:23pm UTC](https://discuss.elastic.co/t/not-able-to-create-see-any-indexs-in-elasticsearch/152524/3 "2018-11-13T21:23:20Z")

</div>

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