Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fluent-plugin-redis-store

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluent-plugin-redis-store

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Redis Output Plugin For fluentd

Fluentd output plugin to upload/publish event data to Redis storage.

Background

This is folked project from fluent-plugin-redisstore.

Features

Supported Redis commands

Currently the plugin supports following Redis commands:

  • set by string type (of the plugin)
  • lpush/rpush by list type
  • sadd by set type
  • zadd by zset type
  • publish by publish type
Supported value format
key string for Redis storage

Redis commands require key and value.
For key, the plugin supports either way;

  1. Specify a fixed key.
    You can do this simply using key option in td-agent configuration file.

    type redis_store
    key userdata
    
  2. Lookup a key string in every event data by a lookup path.
    If event data have structured data like

    { "user": { "name": "Kei" } }
    

    and you want to use each name of user, you can use key_path option.

    type redis_store
    key_path user.name
    

    With the above data, Kei will be a key.

In addition, key_prefix and key_suffix are useful in some cases. Both are available either key and key_path

type redis_store
key_path user.name
key_prefix ouruser.
key_suffix .accesslog

With the previous data, key will be outuser.Kei.accesslog.

value data for Redis storage

To determine what value in every event data to be srtored, you have two options;

  1. Store extracted data in event data, by a lookup path with value_path option.
    It works like key_path.
  2. Store whole data.
    This is default behavior. To do it, simply omit value_path option.

Installation

fluent-gem install fluent-plugin-redis-store

# or if you are using td-agent:
td-agent-gem install fluent-plugin-redis-store

Configuration

Redis connection

KeyTypeRequired?DefaultDescription
hoststringOptional127.0.0.1host name of Redis server
portintOptional6379port number of Redis server
passwordstringOptionalpassword for Redis connection
pathstringOptionalTo connect via Unix socket, try '/tmp/redis.sock'
dbintOptional0DB number of Redis
timeoutfloatOptional5.0connection timeout in seconds

common options for storages

KeyTypeDefaultDescription
keystringFixed key used to store(publish) in Redis
key_pathstringpath to lookup for key in the event data
key_prefixstringprefix of key
key_suffixstringsuffix of key
value_pathstring(whole event data)path to lookup for value in the event data
store_typestringzsetstring/list/set/zset/publish
format_typestringplainformat type for value (plain/json/msgpack)
key_expireint-1If set, the key will be expired in specified seconds
flush_intervaltime1Time interval which events will be flushed to Redis

Note: either key or key_path is required.

string storage specific options

KeyTypeDefaultDescription
typestringFixed key used to store(publish) in Redis
No more options than common options.

list storage specific options

KeyTypeDefaultDescription
orderstringascasc: rpush, desc: lpush

set storage specific options

No more options than common options.

zset storage specific options

KeyTypeDefaultDescription
score_pathstring(time of log event)path to lookup for score in the event data
collision_policystring(nil)Only update elements that already exist (XX) or add a new element (NX)
value_expireintvalue expiration in seconds

If value_expire is set, the plugin assumes that the score in the SortedSet is based on timestamp and it deletes expired members every after new event data arrives.

publish storage specific options

No more options than common options.

Contributors

moaikids
HANAI tohru
Mohit Khanna
yamada-shinji
Heitor de Souza
Hiroshi Hatake
Gabriel Bordeaux

Copyright (c) 2013 moaikids
Copyright (c) 2014 HANAI Tohru

License

Apache License, Version 2.0

FAQs

Package last updated on 07 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc