# Elasticsearch, Where is my filebeat data?

**URL:** https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315
**Category:** Elasticsearch
**Created:** [February 14, 2019, 1:42am UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315 "2019-02-14T01:42:59Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![bradfordaemorton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bradfordaemorton](https://discuss.elastic.co/u/bradfordaemorton)
#### Post date: [February 14, 2019, 1:42am UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/1 "2019-02-14T01:42:59Z")

</div>

I have been playing with ELK and setup Elasticstack to collect my personal webserver access logs. There will be more to come but I though this would be a good starting point.

I have followed the [installation](https://www.elastic.co/guide/en/logstash/current/installing-logstash.html) and [stash my first events guide](https://www.elastic.co/guide/en/logstash/current/first-event.html) and most things are working however there are a few issues I am facing.

A run down of where I am at is below:

- I have installed Filebeat to monitor access logs and output to Logstash on another Ubuntu server – **Working**.
- I have installed Logstash to input, filter and enrich the weblogs (grok apache and geoip filter I think), and output to Elasticsearch on another Ubuntu server – **Working**.
- I have installed Elasticsearch to index the weblogs. This is where it get strange. It appears it is working as there are no errors (the connection established and pipeline is working). When I do a search for the indices I can see the index is created and the “docs count” increases as people visit the site. However, when I search to “match all” I can only see a handful of events. It is as if it worked to ingested logs at some point but stopped or it is still working and the docs are there but not “extracted” – **I have no idea.**
- I have installed Kibana on the same server that is running Elasticsearch. I can access the web interface but there is no data to discover. The strange thing is I can import one of the sample datasets provided with Kibana and search/visualise that data and that data is now available in an index in Elasticsearch so I appears communication is working. The only thing I can see that is different is the sample data is defined as “green” and the other data I have been sending in defined as “yellow”. – **Something is wrong.**

---

<div class="post-metadata">

### Author: ![bradfordaemorton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bradfordaemorton](https://discuss.elastic.co/u/bradfordaemorton)
#### Post date: [February 14, 2019, 1:46am UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/2 "2019-02-14T01:46:07Z")

</div>

Happy to provide any logs or config people require.

---

<div class="post-metadata">

### Author: ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)
#### Post date: [February 14, 2019, 1:57am UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/3 "2019-02-14T01:57:41Z")

</div>

Don't be alarmed by the "yellow" state of some indices. That simply means that you are using the (default) setting of 2 copies of the data, but as long as you only have a single Elasticsearch node you'll only have a single copy.

In Kibana, if you go to _Management_ -\> _Index Management_, do you see all the data that you would be expecting?

Also in _Management_, add your indices under _Index Patterns_ so you can access them in the Discover view.

I'm not sure about the "extracted". Your documents are there, but the fields are not correct? Then it's a problem with your grok pattern.

PS: For Apache2 logs, there is also a [Filebeat module](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-apache2.html) that might be easier to get started with. Then you won't even need Logstash (for this use case).

---

<div class="post-metadata">

### Author: ![bradfordaemorton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bradfordaemorton](https://discuss.elastic.co/u/bradfordaemorton)
#### Post date: [February 14, 2019, 2:59am UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/4 "2019-02-14T02:59:33Z")

</div>

So in Index Management in Kibana I do see the index and I was also able to add the index patern and then discover the data. Success!

The next questions are:

- How and where do I define an index for the weblogs being sent from Filebeat. Currently they are arriving as logstash-[thedate]; and
- Filebeat and Logstash seem to run in the foreground and stop when I log out of an interactive termina. Elasticsearch and Kibana services are running OK.

---

<div class="post-metadata">

### Author: ![bradfordaemorton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bradfordaemorton](https://discuss.elastic.co/u/bradfordaemorton)
#### Post date: [February 14, 2019, 3:18am UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/5 "2019-02-14T03:18:30Z")

</div>

I also notice that there is 2 timestamp fields. One appears to be the timestamp of the event the other is the timestamp of the event getting indexed. Timestamp (13/Feb/2019:22:24:47 +0000 ) verses @timestamp (February 14th 2019, 14:13:14.914). I can only set @timestamp as the time field which is not a true representation of events. Is it possible to use Timestamp not @timestamp?

---

<div class="post-metadata">

### Author: ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)
#### Post date: [February 14, 2019, 8:08pm UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/6 "2019-02-14T20:08:52Z")

</div>

1. `logstash-YYYY.MM.DD` is the default pattern for Logstash, but you could change that in the Logstash output to Elasticsearch.
2. Both Logstash and the Beats will also run as a service. How did you install them? On Linux I'd use the DEB or RPM packages.
3. Probably the timestamp you cannot pick is not a proper timestamp from Kibana's point of view. Check in the index pattern what data type you have and from there you can work back where the mapping or parsing is wrong.

---

<div class="post-metadata">

### Author: ![bradfordaemorton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bradfordaemorton](https://discuss.elastic.co/u/bradfordaemorton)
#### Post date: [February 14, 2019, 8:47pm UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/7 "2019-02-14T20:47:17Z")

</div>

Thanks xeraa,

Do I just need to update my pipelines.conf to include index: "weblogs"

I have read the [output documentation](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-ilm_rollover_alias) but I would like some clarification.

My output defination is below:

output {

```
elasticsearch {

    hosts => ["localhost:9200"]

}

```

}

---

<div class="post-metadata">

### Author: ![bradfordaemorton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bradfordaemorton](https://discuss.elastic.co/u/bradfordaemorton)
#### Post date: [February 14, 2019, 9:13pm UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/8 "2019-02-14T21:13:48Z")

</div>

You can disregard. I updated and it is now working with:

index =\> web\_logs

---

<div class="post-metadata">

### Author: ![bradfordaemorton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bradfordaemorton](https://discuss.elastic.co/u/bradfordaemorton)
#### Post date: [February 14, 2019, 9:19pm UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/9 "2019-02-14T21:19:02Z")

</div>

Big help thanks!

---

<div class="post-metadata">

### Author: ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)
#### Post date: [February 14, 2019, 9:57pm UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/10 "2019-02-14T21:57:31Z")

</div>

Just a word of caution: Having the time in the index name makes deleting data trivial (once you hit the limit of how much data you can or want to keep around). If you don't have so much traffic you could go with a monthly index, so `web_logs-YYYY.MM` for example. Having one massive index would make it very expensive to expire data.

---

<div class="post-metadata">

### Author: ![bradfordaemorton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bradfordaemorton](https://discuss.elastic.co/u/bradfordaemorton)
#### Post date: [February 15, 2019, 5:48am UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/11 "2019-02-15T05:48:57Z")

</div>

Took your advice and updated to a monthly index.

---

<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 15, 2019, 5:48am UTC](https://discuss.elastic.co/t/elasticsearch-where-is-my-filebeat-data/168315/12 "2019-03-15T05:48:57Z")

</div>

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