# Multiplu keys for filebeat redis output plugin is no work

**URL:** <https://discuss.elastic.co/t/multiplu-keys-for-filebeat-redis-output-plugin-is-no-work/89908>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 19, 2017, 9:10am UTC](https://discuss.elastic.co/t/multiplu-keys-for-filebeat-redis-output-plugin-is-no-work/89908 "2017-06-19T09:10:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacker330](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zacker330/32/19247_2.png) [@zacker330](https://discuss.elastic.co/u/zacker330)\
**Post date:** [June 19, 2017, 9:10am UTC](https://discuss.elastic.co/t/multiplu-keys-for-filebeat-redis-output-plugin-is-no-work/89908/1 "2017-06-19T09:10:43Z")

</div>

```auto
output.redis:
  hosts: ["localhost"]
  keys:
    - key: "info_list" # send to info_list if `message` field contains INFO
      when.contains:
        message: "INFO"
    - key: "debug_list" # send to debug_list if `message` field contains DEBUG
      when.contains:
        message: "DEBUG"
    - key: "%{[type]}"
      mapping:
        "http": "frontend_list"
        "nginx": "frontend_list"
        "mysql": "backend_list"

```

when type is http, and there's 'http' key in redis, but frontend\_list not.

---

<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:** [June 19, 2017, 9:49am UTC](https://discuss.elastic.co/t/multiplu-keys-for-filebeat-redis-output-plugin-is-no-work/89908/2 "2017-06-19T09:49:27Z")

</div>

Filebeat version?

Do you have a more complete filebeat configuration? Do you set the `document_type` to `http` in the prospector?

---

<div class="post-metadata">

**Author:** ![zacker330](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zacker330/32/19247_2.png) [@zacker330](https://discuss.elastic.co/u/zacker330)\
**Post date:** [June 19, 2017, 9:59am UTC](https://discuss.elastic.co/t/multiplu-keys-for-filebeat-redis-output-plugin-is-no-work/89908/3 "2017-06-19T09:59:49Z")

</div>

Thanks steffens.

Filebeat 5.2.2

here is my full configuration:

```auto

---
filebeat:
  logging.files:
    keepfiles: 3
    name: filebeat.log
    path: /var/log/filebeat
  logging.level: warning
  logging.to_files: true
  prospectors:
  - document_type: nginx
    input_type: log
    max_lines: 100
    multiline.match: after
    multiline.negate: true
    multiline.pattern: ^\w*\s-\s[0-9]{4}-[0-9]{2}-[0-9]{2}
    paths:
    - /usr/local/xxxx/log/bbb.log
    - /usr/local/xxxx/log/xxx.log
    tail_files: true
    timeout: 3s
  - document_type: http
    input_type: log
    max_lines: 100
    multiline.match: after
    multiline.negate: true
    multiline.pattern: ^\w*\s-\s[0-9]{4}-[0-9]{2}-[0-9]{2}
    paths:
    - /usr/local/xxxxxx/log/xxx.log
    tail_files: true
    timeout: 3s
output:
  redis:
    db: '0'
    hosts:
            - xxxxx.com:6379
    key: 'default_key'
    keys:
      - key: "info_list" 
        when.contains:
          message: "INFO"
      - key: "%{[type]}"
        mapping:
          "http": "frontend_list"
          "nginx": "frontend_list"
          "mysql": "backend_list"
    timeout: 5

```

---

<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:** [June 20, 2017, 9:12am UTC](https://discuss.elastic.co/t/multiplu-keys-for-filebeat-redis-output-plugin-is-no-work/89908/4 "2017-06-20T09:12:34Z")

</div>

looks like a typo. It must say `mappings`, not `mapping` in the configuration file.

---

<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 18, 2017, 9:27am UTC](https://discuss.elastic.co/t/multiplu-keys-for-filebeat-redis-output-plugin-is-no-work/89908/5 "2017-07-18T09:27:19Z")

</div>

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