redis

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: GPL-3.0 Imports: 15 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:

Metrics

All metrics have "redis." prefix.

Metric Scope Dimensions Units
connections global accepted, rejected connections/s
clients global connected, blocked, tracking, in_timeout_table clients
ping_latency global min, max, avg seconds
commands global processes commands/s
keyspace_lookup_hit_rate global lookup_hit_rate percentage
memory global max, used, rss, peak, dataset, lua, scripts bytes
mem_fragmentation_ratio global mem_fragmentation ratio
key_eviction_events global evicted keys/s
net global received, sent kilobits/s
rdb_changes global changes operations
bgsave_now global current_bgsave_time seconds
bgsave_health global last_bgsave status
bgsave_last_rdb_save_since_time global last_bgsave_time seconds
aof_file_size global current, base bytes
commands_calls global a dimension per command calls
commands_usec global a dimension per command microseconds
commands_usec_per_sec global a dimension per command microseconds/s
key_expiration_events global expired keys/s
database_keys global a dimension per database keys
database_expires_keys global a dimension per database keys
connected_replicas global connected replicas
master_link_status global up, down status
master_last_io_since_time global time seconds
master_link_down_since_time global time seconds
uptime global uptime 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.

Note: If the Redis server is password protected via the requirepass option, make sure you have a colon before the password.

# 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: local
    address: 'redis://:password@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.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
    
  • Switch to the netdata user.

    sudo -u netdata -s
    
  • 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"`
	PingSamples      int          `yaml:"ping_samples"`
	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