This is a plugin for Logstash.
It is fully free and fully open source. The license is MIT, see LICENSE for further infos.
Actions allowed:
get
- Get cache with key in :get and set value in :targetset
- Set cache with key in :set and value from :sourcesetex
- Set cache with key in :setex, considering TTL from :ttl (in seconds) and value from :sourceexists
- Checks if key :exists exists and save result in :targetdel
- Deletes cache with key :delllen
- Get length of a list with key :llen and save result in :targetrpush
- Appends a value :source in a list with key :rpushrpushnx
- 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 :sourcehget
- Get a value into :target from a hash field with :hget keysadd
- Adds one or more members from :sadd to a set :sourcesismember
- Determine if a :source value is a member of a set :sismember and save in :targetsmembers
- Get all members from :smembers key and put in :targetscard
- Get number of members of set :scard and put in :targetrpop
- Removes and get last element from list :rpop and save in :targetlpop
- Removes and get first element from list :lpop and save in :targetlget
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]"
}
}
For further instructions on howto develop on logstash plugins, please see the documentation of the official logstash-filter-example.