Redis module

Hi,
in my current scenario I have 2 different Redis instances running on the same server.
I have installed Metricbeat and enabled its module; is there a way to collect data from both instances? should I just put them into hosts field contained in redis.module?
is there a way to add a tag to them? for instance, when I get data from instance A I want the tag AAA while for instance B I want the tag BBB

thanks

Hi @rschirin,

Yes, you can add multiple hosts into the hosts field, and then events will have a different service.address, each one with one of the ip:ports, like this:

- module: redis
  hosts: ['localhost:6379', 'localhost:16379']
  ...

If you want to add other custom fields then you need to configure multiple modules, something like this:

- module: redis
  hosts: ['localhost:6379']
  ...
  fields:
    instance: 'AAA'
- module: redis
  hosts: ['localhost:16379']
  ...
  fields:
    instance: 'BBB'

Or you can also use the ECS service.name field, that can be set in metricbeat modules like this:

- module: redis
  hosts: ['localhost:6379']
  ...
  service.name: 'AAA'
- module: redis
  hosts: ['localhost:16379']
  ...
  service.name: 'BBB'
1 Like

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