A Redis plugin for collectd using collectd's Python plugin.
This plugin is an output plugin (writer). Instead of using Redis as a datastore like the native write_redis
plugin which is part of collectd, it uses Redis as a queue. So this can be seen as an alternative to the amqp-plugin (which is not very cool if you want to use json and a lot of custom types).
The format of the data is collectd's JSON format (the same that can be used for rabbitmq).
- Place
write_redis_queue.py
in${COLLECTD_PLUGINDIR}/python/write_redis_queue.py
- Configure the plugin (see below).
- Restart collectd.
Add the following to your collectd config:
<LoadPlugin python>
Globals true
</LoadPlugin>
<Plugin python>
ModulePath "/usr/lib/collectd/python"
Import "write_redis_queue"
<Module write_redis_queue>
Host "localhost"
Port 6379
Queue "collectd"
TypesDB "/usr/share/collectd/types.db"
</Module>
</Plugin>
You can add multiple typesdb files here, but they are needed to construct the json structure.
If you experience any errors, please open an issue on github!