Type settings:
The Redis plugin in Logstash specifies three ways to read the information in the Redis queue.
- List=>blpop ( equivalent to queue )
- Channel=>subscribe ( equivalent to a specific channel for publishing subscriptions )
- Pattern_channel=>psubscribe ( equivalent to publishing a subscription to a group of channels )
Where list is the equivalent of a queue; a channel is equivalent to a specific channel for a subscription; Pattern_channel is equivalent to publishing a subscription to a group of channels
Parameter settings:
DB:
Redis has a database concept, typically 16, the default login is 0, can be selected by the command. If the application chooses to use a different database, you can read the information from the specified database by configuring this parameter.
Key:
Data in Redis is indexed by key values, whether a string or a list, so this key is equivalent to a table in the database.
If it is a list or channel mode, key is the specified key value, and if it is pattern_channel, then key can be specified by means of glob wildcard.
Password:
Some redis is required to be validated for security purposes. The information can be read correctly only if the password is set. Conversely, if Redis does not have a password set, and the password is configured in Logstash, it will also error!
Batch_count:
This property sets the number of events returned by the server, such as setting 5, so that each request will fetch a maximum of 5 log returns.
Logstash Reading Redis Data