No commit activity in last 3 years
No release in over 3 years
A Logstash filter plugin for storing and retrieving data from redis cache. This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gem_name. This gem is not a stand-alone program.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 3.3, >= 3.3.3
~> 0.2, >= 0.2.0
 Project Readme

Logstash Filter Rediss Plugin

Build Status Gem Version GitHub license

This is a plugin for Logstash.

It is fully free and fully open source. The license is MIT, see LICENSE for further infos.

Documentation

Actions allowed:

  • get - Get cache with key in :get and set value in :target
  • set - Set cache with key in :set and value from :source
  • setex - Set cache with key in :setex, considering TTL from :ttl (in seconds) and value from :source
  • exists - Checks if key :exists exists and save result in :target
  • del - Deletes cache with key :del
  • llen - Get length of a list with key :llen and save result in :target
  • rpush - Appends a value :source in a list with key :rpush
  • rpushnx - Appends a value :source in a list with key :rpush only with key not exists. This operation uses red lock;
  • hset - Set hash with key in :hset, field from : field and value from :source
  • hget - Get a value into :target from a hash field with :hget key
  • sadd - Adds one or more members from :sadd to a set :source
  • sismember - Determine if a :source value is a member of a set :sismember and save in :target
  • smembers - Get all members from :smembers key and put in :target
  • scard - Get number of members of set :scard and put in :target
  • rpop - Removes and get last element from list :rpop and save in :target
  • lpop - Removes and get first element from list :lpop and save in :target
  • lget Get all elements from a list :lget and save in :target

Get Sample:

filter {
    rediss {
        host => "redis.company.com"
        port => 6379
        db => 0
        password => "authtoken"
        get => "[data][id]"
        target => "[data][result]"
    }
}

Set with TTL Sample:

filter {
    rediss {
        host => "redis.company.com"
        port => 6379
        db => 0
        password => "authtoken"
        ttl => 300
        setex => "[data][id]"
        source => "[data][content]"
    }
}

Developing

For further instructions on howto develop on logstash plugins, please see the documentation of the official logstash-filter-example.