Skip to content

This is a collectd plugin which runs under the Python plugin to collect metrics from redis.

License

Notifications You must be signed in to change notification settings

zerthimon/redis_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis_plugin

This is a collectd (http://collectd.org/) plugin which runs under the Python plugin (https://collectd.org/wiki/index.php/Plugin:Python) to collect metrics from redis (http://redis.io/).

Requirements:

Redis
Read access to Redis' UNIX Domain socket or TCP port.

collectd
Collectd must have the Python plugin installed. See (https://collectd.org/wiki/index.php/Plugin:Python)

Python 2.6 and later
Plugin currently supports Python 2.6 and later.

Options:

  • Socket
    Path to a UNIX Domain socket of the Redis instance.
    Default: none
  • IP
    IP Address of the Redis instance.
    When specified together with Socket, takes over Socket option.
    Default: 127.0.0.1
  • Port
    TCP Port of the Redis instance.
    Default: 6379
  • Auth
    Password to use when connecting to Redis instance.
    Default: none
  • Commandstats
    Include Redis command statistics, from "INFO COMMANDSTATS" command.
    Default: false
  • Verbose
    Provide verbose logging of plugin operation in the Collectd's log.
    Default: false
  • Instance
    There are situations when multiple instances of Redis need to run on the same host. This option opens an Instance block.

Single-instance Plugin Config Example:

TypesDB "/usr/share/collectd/redis_types.db"

<LoadPlugin python>
    Globals true
</LoadPlugin>

<Plugin python>
    # redis_plugin.py is at /usr/lib64/collectd/redis_plugin.py
    ModulePath "/usr/lib64/collectd/"

    Import "redis_plugin"

    <Module redis_plugin>
      Socket "/var/run/redis.sock"
      Commandstats true
      Verbose false
    </Module>
</Plugin>

Multi-instance Plugin Config Example:

TypesDB "/usr/share/collectd/redis_types.db"`

<LoadPlugin python>
    Globals true
</LoadPlugin>

<Plugin python>
    # redis_plugin.py is at /usr/lib64/collectd/redis_plugin.py
    ModulePath "/usr/lib64/collectd/"

    Import "redis_plugin"

    <Module redis_plugin>
      <Instance redis1>
          Socket "/var/run/redis1.sock"
          Commandstats false
      </Instance>
      <Instance redis2>
          IP "127.0.0.1"
          Port 6379
          Auth "foobared"
          Commandstats true
      </Instance>
      Verbose false
    </Module>
</Plugin>

Graph Examples:

These graphs were created using Graphite (http://graphite.wikidot.com/)

Connected Clients: Connected Clients

Redis Process RSS Memory: Redis Process RSS Memory

Commands per Second: Commands per Second

Redis GET Commands per Second: Redis GET Commands per Second

Cache Hits: Cache Hits

RDB Changes Since Last Save: RDB Changes Since Last Save

Total Keys in db0: Total Keys in db0

Stats Example 1:
Stats Example 1

Stats Example 2:
Stats Example 2

About

This is a collectd plugin which runs under the Python plugin to collect metrics from redis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages