redis

package
v0.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2022 License: GPL-3.0 Imports: 14 Imported by: 1

README

Redis monitoring with Netdata

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.


This module monitors one or more Redis instances, depending on your configuration.

It collects information and statistics about the server executing the following commands:

Charts

Connections
  • Accepted and rejected (maxclients limit) connections in connections/s
  • Clients in clients
Memory
  • Memory usage in bytes
  • Ratio between used_memory_rss and used_memory in ratio
Network bandwidth
  • Bandwidth in kilobits/s
Replication
  • Connected replicas in replicas
Persistence RDB
  • Operations that produced changes since the last SAVE or BGSAVE in operations
  • Duration of the on-going RDB save operation if any in seconds
  • Status of the last RDB save operation in status
Persistence AOF
  • AOF file size in bytes
Commands
  • Processed commands in queries/s
  • Calls per command in calls/s
  • Total CPU time consumed by the commands in usec
  • Average CPU consumed per command execution in usec/s
Keyspace
  • Keys lookup hit rate in percentage
  • Evicted keys due to maxmemory limit in keys/s
  • Expired keys in keys/s
  • Keys per database in keys
  • Keys with an expiration per database in keys
Uptime
  • Uptime in seconds

Configuration

Edit the go.d/redis.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d/redis.conf

There are two connection types: by tcp socket and by unix socket.

# by tcp socket
redis://<user>:<password>@<host>:<port>

# by unix socket
unix://<user>:<password>@</path/to/redis.sock

Needs only address, here is an example with two jobs:

jobs:
  - name: local
    address: 'redis://@127.0.0.1:6379'

  - name: remote
    address: 'redis://user:password@203.0.113.0:6379'

For all available options, see the redis collector's configuration file.

Troubleshooting

To troubleshoot issues with the redis collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

First, navigate to your plugins directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the setting plugins directory. Once you're in the plugin's directory, switch to the netdata user.

cd /usr/libexec/netdata/plugins.d/
sudo -u netdata -s

You can now run the go.d.plugin to debug the collector:

./go.d.plugin -d -m redis

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address          string       `yaml:"address"`
	Timeout          web.Duration `yaml:"timeout"`
	tlscfg.TLSConfig `yaml:",inline"`
}

type Redis

type Redis struct {
	module.Base
	Config `yaml:",inline"`
	// contains filtered or unexported fields
}

func New

func New() *Redis

func (*Redis) Charts

func (r *Redis) Charts() *module.Charts

func (*Redis) Check

func (r *Redis) Check() bool

func (*Redis) Cleanup

func (r *Redis) Cleanup()

func (*Redis) Collect

func (r *Redis) Collect() map[string]int64

func (*Redis) Init

func (r *Redis) Init() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL