Plugin:Write Redis

From collectd Wiki
Jump to: navigation, search
Write Redis plugin
Type: write
Callbacks: config, write
Status: experimental
First version: 5.0
Copyright: 2010 Florian octo Forster
License: MIT license
Manpage: to do
List of Plugins

The Write Redis plugin stores values in Redis, a “data structures server”.

The plugin is currently experimental. Different ways of structuring the data is being discussed at Plugin:Write Redis/Design – please feel free to add your ideas and experience.

Contents

Synopsis

<Plugin redis>
  <Node "mynode">
    Host "localhost"
    Port "6379"
    Timeout 2000
  </Node>
</Plugin>

This will register a writer by the name

write_redis/localhost

Redis config

Virtual memory

Per default Redis keeps all data in memory. This means that as more and more data is written to Redis, your system will run out of memory. Once all memory is consumed, the system will start swapping and become unusable. It is therefore absolutely necessary that you use the virtual memory option that was added in Redis 2.0. You can start with the following example config when setting up virtual memory.

# Enable virtual memory and specify swap file location
vm-enabled yes
vm-swap-file /var/lib/redis/redis.swap
# Use 1 Gbyte of memory
vm-max-memory 1073741824
# Create a 128 Gbyte swap file
vm-page-size 1024
vm-pages 134217728
# Number of I/O threads
vm-max-threads 4

Dependencies

  • credis, C library implementing the redis protocol.

See also


Personal tools
Namespaces

Variants
Actions
Navigation
Tools