# Metricbeat - logstash - redis - elasticsearch

**URL:** https://discuss.elastic.co/t/metricbeat-logstash-redis-elasticsearch/89059
**Category:** Beats
**Tags:** metricbeat
**Created:** [June 12, 2017, 2:27pm UTC](https://discuss.elastic.co/t/metricbeat-logstash-redis-elasticsearch/89059 "2017-06-12T14:27:19Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![abrejuin](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@abrejuin](https://discuss.elastic.co/u/abrejuin)
#### Post date: [June 12, 2017, 2:27pm UTC](https://discuss.elastic.co/t/metricbeat-logstash-redis-elasticsearch/89059/1 "2017-06-12T14:27:20Z")

</div>

Hello,

I am trying to use Metricbeat for a few days ago.

I did installed Metricbeat on a windows server with "memory" metricsets only.

Metricbeat is sendind logs to a Logstash server and Logstash is sending logs to Redis.  
I can see Metricbeat logs in Redis.

Then I have another Logstash server which is taking Redis logs to load them in Elasticsearch.  
I don't see anything in Elasticsearch.

I did add metricbeat.template.json but still nothing.

Thanks for your help.

Best regards  
Antoine

---

<div class="post-metadata">

### Author: ![abrejuin](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@abrejuin](https://discuss.elastic.co/u/abrejuin)
#### Post date: [June 12, 2017, 2:59pm UTC](https://discuss.elastic.co/t/metricbeat-logstash-redis-elasticsearch/89059/2 "2017-06-12T14:59:24Z")

</div>

Here is the output configuration

```auto
output {
        if "metricbeat" in [tags] {
                elasticsearch {
                        hosts => ["172.17.0.22:9200"]
                        index => "idx-%{[@metadata][beat]}-%{+YYYY.MM.dd}"
                        flush_size => 100
                        idle_flush_time => 1
                        template => "/etc/logstash/templates.d/metricbeat.template.json"
                        template_name => "metricbeat"
                        template_overwrite => true
                        document_type => "logs"
                }
        }
        else {
                elasticsearch {
                        hosts => ["172.17.0.22:9200"]
                        index => "idx-%{meta_app}-%{meta_env}-%{+YYYY.MM.dd}"
                        flush_size => 100
                        idle_flush_time => 1
                        template => "/etc/logstash/templates.d/default-template.json"
                        template_name => "default"
                        template_overwrite => true
                        document_type => "logs"
                }
        }
}

```

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [June 12, 2017, 10:36pm UTC](https://discuss.elastic.co/t/metricbeat-logstash-redis-elasticsearch/89059/3 "2017-06-12T22:36:21Z")

</div>

> [@abrejuin](#):
>
> Metricbeat is sendind logs to a Logstash server and Logstash is sending logs to Redis.

BTW Metricbeat can send data directly to Redis with its [redis output](https://www.elastic.co/guide/en/beats/metricbeat/master/redis-output.html).

> [@abrejuin](#):
>
> Then I have another Logstash server which is taking Redis logs to load them in Elasticsearch.  
> I don't see anything in Elasticsearch.

Do you know if Logstash is reading from redis? Can you add a non-conditional console output so you can see the events.

```auto
output {
  stdout { codec => rubydebug }
}

```

Do those events have a "metricbeat" tag?

Are there any errors in your LS logs or in your ES logs?

Because you have modified the destination index from the default, did you modify the index [template](https://github.com/elastic/beats/blob/v5.4.1/metricbeat/metricbeat.template.json#L4134) to match the new index name?

---

<div class="post-metadata">

### Author: ![abrejuin](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@abrejuin](https://discuss.elastic.co/u/abrejuin)
#### Post date: [June 14, 2017, 10:30am UTC](https://discuss.elastic.co/t/metricbeat-logstash-redis-elasticsearch/89059/4 "2017-06-14T10:30:16Z")

</div>

Hello,

Thanks for your answer.

I just tried to debug logstash (the second one) with output stdout but no event appeared so Logstash is not reading from redis.

I already had a "metricbeat" tags in metricbeat configuration  
**#================================ General =====================================**

**# The name of the shipper that publishes the network data. It can be used to group**  
**# all the transactions sent by a single shipper in the web interface.**  
**#name:**

**# The tags of the shipper are included in their own field with each** strong text  
**# transaction published.**  
**#tags: ["tampon"]**  
tags: ["metricbeat", "METAS:env=staging,app=rfid,mod=central,com=jetty,log=access,fmt=GBM\_RFID\_ACCESS\_JETTY,ml=n,hot=y,path=/var/log/central/access.log"]

---

<div class="post-metadata">

### Author: ![abrejuin](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@abrejuin](https://discuss.elastic.co/u/abrejuin)
#### Post date: [June 14, 2017, 10:46am UTC](https://discuss.elastic.co/t/metricbeat-logstash-redis-elasticsearch/89059/5 "2017-06-14T10:46:10Z")

</div>

it is better since I choose to directly send metricbeat to redis instead of going through logstash first.

Now I can see logs in logstash, I am going to try to push those logs to Elasticsearch.

Thanks a lot for your help Andrew

---

<div class="post-metadata">

### Author: ![abrejuin](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@abrejuin](https://discuss.elastic.co/u/abrejuin)
#### Post date: [June 14, 2017, 12:47pm UTC](https://discuss.elastic.co/t/metricbeat-logstash-redis-elasticsearch/89059/6 "2017-06-14T12:47:06Z")

</div>

And now I can see Metricbeat logs in Elasticsearch, that's perfect !

---

<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: [July 12, 2017, 12:47pm UTC](https://discuss.elastic.co/t/metricbeat-logstash-redis-elasticsearch/89059/7 "2017-07-12T12:47:25Z")

</div>

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