# Filebeat redis module not working

**URL:** <https://discuss.elastic.co/t/filebeat-redis-module-not-working/278965>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [July 17, 2021, 10:35am UTC](https://discuss.elastic.co/t/filebeat-redis-module-not-working/278965 "2021-07-17T10:35:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mason/32/46467_2.png) [@Mason](https://discuss.elastic.co/u/Mason)\
**Post date:** [July 17, 2021, 10:35am UTC](https://discuss.elastic.co/t/filebeat-redis-module-not-working/278965/1 "2021-07-17T10:35:03Z")

</div>

Hi, I am using redis module from filebeat to monitor a redis docker container. (using docker image [docker.elastic.co/beats/filebeat:7.13.1](http://docker.elastic.co/beats/filebeat:7.13.1))

```auto
# enable redis module
filebeat.modules:
  - module: redis
# redis container
filebeat.autodiscover:
  providers:
    - type: docker
      templates:
        - condition:
            contains:
              docker.container.name: redis
          config:
            - module: redis
              log:
                enabled: true
              slowlog:
                enabled: true
                var.hosts: ["redis:6379"]

```

I can see from the logs that module is trying to access the localhost (127.0.0.1:6379). I am using docker swarm and attaching to the overlay network. The name of the container redis (named redis) should be resolved by the docker. I am not sure why it is trying to access localhost when I told it to connect to "redis:6379"

```auto
...
beats_filebeat.1.obeqtflii3cs@prod-app01 | 2021-07-17T00:25:31.018Z	ERROR	harvester/registry.go:98	Error running input: error receiving slowlog data: dial tcp 127.0.0.1:6379: connect: connection refused
....
beats_filebeat.1.obeqtflii3cs@prod-app01 | 2021-07-17T00:25:31.133Z	INFO	log/input.go:157	Configured paths: [/var/log/redis/redis-server.log*]
beats_filebeat.1.obeqtflii3cs@prod-app01 | 2021-07-17T00:25:31.133Z	WARN	[cfgwarn]	redis/input.go:52	EXPERIMENTAL: Redis slowlog input is enabled.
beats_filebeat.1.obeqtflii3cs@prod-app01 | 2021-07-17T00:25:31.135Z	INFO	log/input.go:157	Configured paths: [/var/log/redis/redis-server.log*]
beats_filebeat.1.obeqtflii3cs@prod-app01 | 2021-07-17T00:25:31.135Z	WARN	[cfgwarn]	redis/input.go:52	EXPERIMENTAL: Redis slowlog input is enabled.
...
beats_filebeat.1.obeqtflii3cs@prod-app01 | 2021-07-17T00:25:41.020Z	ERROR	harvester/registry.go:98	Error running input: error receiving slowlog data: dial tcp 127.0.0.1:6379: connect: connection refused
beats_filebeat.1.obeqtflii3cs@prod-app01 | 2021-07-17T00:25:51.021Z	ERROR	harvester/registry.go:98	Error running input: error receiving slowlog data: dial tcp 127.0.0.1:6379: connect: connection refused
beats_filebeat.1.obeqtflii3cs@prod-app01 | 2021-07-17T00:26:01.022Z	ERROR	harvester/registry.go:98	Error running input: error receiving slowlog data: dial tcp 127.0.0.1:6379: connect: connection refused

```

Is this something, I am doing wrong or it is a bug in the filebeat redis module ?

---

<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:** [August 14, 2021, 12:35pm UTC](https://discuss.elastic.co/t/filebeat-redis-module-not-working/278965/2 "2021-08-14T12:35:15Z")

</div>

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