---
title: Telegraf Documentation
description: Telegraf plugin for collecting metrics from Redis Sentinel
url: https://docs.influxdata.com/telegraf/v1/input-plugins/redis_sentinel/
estimated_tokens: 3454
product: Telegraf
version: v1
---

-   Telegraf v1.22.0+

# Redis Sentinel Input Plugin

This plugin collects metrics for [Redis Sentinel](https://redis.io/docs/latest/operate/oss_and_stack/management/sentinel/) instances monitoring Redis servers and replicas.

**Introduced in:** Telegraf v1.22.0 **Tags:** server **OS support:** all

## Global configuration options

Plugins support additional global and plugin configuration settings for tasks such as modifying metrics, tags, and fields, creating aliases, and configuring plugin ordering. See [CONFIGURATION.md](/telegraf/v1/configuration/#plugins) for more details.

## Configuration

```toml
# Read metrics from one or many redis-sentinel servers
[[inputs.redis_sentinel]]
  ## specify servers via a url matching:
  ##  [protocol://]()@address[:port]
  ##  e.g.
  ##    tcp://localhost:26379
  ##    tcp://username:password@192.168.99.100
  ##    unix:///var/run/redis-sentinel.sock
  ##
  ## If no servers are specified, then localhost is used as the host.
  ## If no port is specified, 26379 is used
  # servers = ["tcp://localhost:26379"]

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = true
```

## Metrics

The plugin gathers the results of these commands and measurements:

-   `sentinel masters` - `redis_sentinel_masters`
-   `sentinel sentinels` - `redis_sentinels`
-   `sentinel replicas` - `redis_replicas`
-   `info all` - `redis_sentinel`

The `has_quorum` field in `redis_sentinel_masters` is from calling the command `sentinels ckquorum`.

There are 5 remote network requests made for each server listed in the config.

-   redis\_sentinel\_masters
    
    -   tags:
        
        -   host
        -   master
        -   port
        -   source
    -   fields:
        
        -   config\_epoch (int)
        -   down\_after\_milliseconds (int)
        -   failover\_timeout (int)
        -   flags (string)
        -   has\_quorum (bool)
        -   info\_refresh (int)
        -   ip (string)
        -   last\_ok\_ping\_reply (int)
        -   last\_ping\_reply (int)
        -   last\_ping\_sent (int)
        -   link\_pending\_commands (int)
        -   link\_refcount (int)
        -   num\_other\_sentinels (int)
        -   num\_slaves (int)
        -   parallel\_syncs (int)
        -   port (int)
        -   quorum (int)
        -   role\_reported (string)
        -   role\_reported\_time (int)
-   redis\_sentinel\_sentinels
    
    -   tags:
        
        -   host
        -   master
        -   port
        -   sentinel\_ip
        -   sentinel\_port
        -   source
    -   fields:
        
        -   down\_after\_milliseconds (int)
        -   flags (string)
        -   last\_hello\_message (int)
        -   last\_ok\_ping\_reply (int)
        -   last\_ping\_reply (int)
        -   last\_ping\_sent (int)
        -   link\_pending\_commands (int)
        -   link\_refcount (int)
        -   name (string)
        -   voted\_leader (string)
        -   voted\_leader\_epoch (int)
-   redis\_sentinel\_replicas
    
    -   tags:
        
        -   host
        -   master
        -   port
        -   replica\_ip
        -   replica\_port
        -   source
    -   fields:
        
        -   down\_after\_milliseconds (int)
        -   flags (string)
        -   info\_refresh (int)
        -   last\_ok\_ping\_reply (int)
        -   last\_ping\_reply (int)
        -   last\_ping\_sent (int)
        -   link\_pending\_commands (int)
        -   link\_refcount (int)
        -   master\_host (string)
        -   master\_link\_down\_time (int)
        -   master\_link\_status (string)
        -   master\_port (int)
        -   name (string)
        -   role\_reported (string)
        -   role\_reported\_time (int)
        -   slave\_priority (int)
        -   slave\_repl\_offset (int)
-   redis\_sentinel
    
    -   tags:
        
        -   host
        -   port
        -   source
    -   fields:
        
        -   active\_defrag\_hits (int)
        -   active\_defrag\_key\_hits (int)
        -   active\_defrag\_key\_misses (int)
        -   active\_defrag\_misses (int)
        -   blocked\_clients (int)
        -   client\_recent\_max\_input\_buffer (int)
        -   client\_recent\_max\_output\_buffer (int)
        -   clients (int)
        -   evicted\_keys (int)
        -   expired\_keys (int)
        -   expired\_stale\_perc (float)
        -   expired\_time\_cap\_reached\_count (int)
        -   instantaneous\_input\_kbps (float)
        -   instantaneous\_ops\_per\_sec (int)
        -   instantaneous\_output\_kbps (float)
        -   keyspace\_hits (int)
        -   keyspace\_misses (int)
        -   latest\_fork\_usec (int)
        -   lru\_clock (int)
        -   migrate\_cached\_sockets (int)
        -   pubsub\_channels (int)
        -   pubsub\_patterns (int)
        -   redis\_version (string)
        -   rejected\_connections (int)
        -   sentinel\_masters (int)
        -   sentinel\_running\_scripts (int)
        -   sentinel\_scripts\_queue\_length (int)
        -   sentinel\_simulate\_failure\_flags (int)
        -   sentinel\_tilt (int)
        -   slave\_expires\_tracked\_keys (int)
        -   sync\_full (int)
        -   sync\_partial\_err (int)
        -   sync\_partial\_ok (int)
        -   total\_commands\_processed (int)
        -   total\_connections\_received (int)
        -   total\_net\_input\_bytes (int)
        -   total\_net\_output\_bytes (int)
        -   uptime\_ns (int, nanoseconds)
        -   used\_cpu\_sys (float)
        -   used\_cpu\_sys\_children (float)
        -   used\_cpu\_user (float)
        -   used\_cpu\_user\_children (float)

## Example Output

An example of 2 Redis Sentinel instances monitoring a single master and replica. It produces:

### redis\_sentinel\_masters

```text
redis_sentinel_masters,host=somehostname,master=mymaster,port=26380,source=localhost config_epoch=0i,down_after_milliseconds=30000i,failover_timeout=180000i,flags="master",has_quorum=1i,info_refresh=110i,ip="127.0.0.1",last_ok_ping_reply=819i,last_ping_reply=819i,last_ping_sent=0i,link_pending_commands=0i,link_refcount=1i,num_other_sentinels=1i,num_slaves=1i,parallel_syncs=1i,port=6379i,quorum=2i,role_reported="master",role_reported_time=311248i 1570207377000000000
redis_sentinel_masters,host=somehostname,master=mymaster,port=26379,source=localhost config_epoch=0i,down_after_milliseconds=30000i,failover_timeout=180000i,flags="master",has_quorum=1i,info_refresh=1650i,ip="127.0.0.1",last_ok_ping_reply=1003i,last_ping_reply=1003i,last_ping_sent=0i,link_pending_commands=0i,link_refcount=1i,num_other_sentinels=1i,num_slaves=1i,parallel_syncs=1i,port=6379i,quorum=2i,role_reported="master",role_reported_time=302990i 1570207377000000000
```

### redis\_sentinel\_sentinels

```text
redis_sentinel_sentinels,host=somehostname,master=mymaster,port=26380,sentinel_ip=127.0.0.1,sentinel_port=26379,source=localhost down_after_milliseconds=30000i,flags="sentinel",last_hello_message=1337i,last_ok_ping_reply=566i,last_ping_reply=566i,last_ping_sent=0i,link_pending_commands=0i,link_refcount=1i,name="fd7444de58ecc00f2685cd89fc11ff96c72f0569",voted_leader="?",voted_leader_epoch=0i 1570207377000000000
redis_sentinel_sentinels,host=somehostname,master=mymaster,port=26379,sentinel_ip=127.0.0.1,sentinel_port=26380,source=localhost down_after_milliseconds=30000i,flags="sentinel",last_hello_message=1510i,last_ok_ping_reply=1004i,last_ping_reply=1004i,last_ping_sent=0i,link_pending_commands=0i,link_refcount=1i,name="d06519438fe1b35692cb2ea06d57833c959f9114",voted_leader="?",voted_leader_epoch=0i 1570207377000000000
```

### redis\_sentinel\_replicas

```text
redis_sentinel_replicas,host=somehostname,master=mymaster,port=26379,replica_ip=127.0.0.1,replica_port=6380,source=localhost down_after_milliseconds=30000i,flags="slave",info_refresh=1651i,last_ok_ping_reply=1005i,last_ping_reply=1005i,last_ping_sent=0i,link_pending_commands=0i,link_refcount=1i,master_host="127.0.0.1",master_link_down_time=0i,master_link_status="ok",master_port=6379i,name="127.0.0.1:6380",role_reported="slave",role_reported_time=302983i,slave_priority=100i,slave_repl_offset=40175i 1570207377000000000
redis_sentinel_replicas,host=somehostname,master=mymaster,port=26380,replica_ip=127.0.0.1,replica_port=6380,source=localhost down_after_milliseconds=30000i,flags="slave",info_refresh=111i,last_ok_ping_reply=821i,last_ping_reply=821i,last_ping_sent=0i,link_pending_commands=0i,link_refcount=1i,master_host="127.0.0.1",master_link_down_time=0i,master_link_status="ok",master_port=6379i,name="127.0.0.1:6380",role_reported="slave",role_reported_time=311243i,slave_priority=100i,slave_repl_offset=40441i 1570207377000000000
```

### redis\_sentinel

```text
redis_sentinel,host=somehostname,port=26379,source=localhost active_defrag_hits=0i,active_defrag_key_hits=0i,active_defrag_key_misses=0i,active_defrag_misses=0i,blocked_clients=0i,client_recent_max_input_buffer=2i,client_recent_max_output_buffer=0i,clients=3i,evicted_keys=0i,expired_keys=0i,expired_stale_perc=0,expired_time_cap_reached_count=0i,instantaneous_input_kbps=0.01,instantaneous_ops_per_sec=0i,instantaneous_output_kbps=0,keyspace_hits=0i,keyspace_misses=0i,latest_fork_usec=0i,lru_clock=9926289i,migrate_cached_sockets=0i,pubsub_channels=0i,pubsub_patterns=0i,redis_version="5.0.5",rejected_connections=0i,sentinel_masters=1i,sentinel_running_scripts=0i,sentinel_scripts_queue_length=0i,sentinel_simulate_failure_flags=0i,sentinel_tilt=0i,slave_expires_tracked_keys=0i,sync_full=0i,sync_partial_err=0i,sync_partial_ok=0i,total_commands_processed=459i,total_connections_received=6i,total_net_input_bytes=24517i,total_net_output_bytes=14864i,uptime_ns=303000000000i,used_cpu_sys=0.404,used_cpu_sys_children=0,used_cpu_user=0.436,used_cpu_user_children=0 1570207377000000000
redis_sentinel,host=somehostname,port=26380,source=localhost active_defrag_hits=0i,active_defrag_key_hits=0i,active_defrag_key_misses=0i,active_defrag_misses=0i,blocked_clients=0i,client_recent_max_input_buffer=2i,client_recent_max_output_buffer=0i,clients=2i,evicted_keys=0i,expired_keys=0i,expired_stale_perc=0,expired_time_cap_reached_count=0i,instantaneous_input_kbps=0.01,instantaneous_ops_per_sec=0i,instantaneous_output_kbps=0,keyspace_hits=0i,keyspace_misses=0i,latest_fork_usec=0i,lru_clock=9926289i,migrate_cached_sockets=0i,pubsub_channels=0i,pubsub_patterns=0i,redis_version="5.0.5",rejected_connections=0i,sentinel_masters=1i,sentinel_running_scripts=0i,sentinel_scripts_queue_length=0i,sentinel_simulate_failure_flags=0i,sentinel_tilt=0i,slave_expires_tracked_keys=0i,sync_full=0i,sync_partial_err=0i,sync_partial_ok=0i,total_commands_processed=442i,total_connections_received=2i,total_net_input_bytes=23861i,total_net_output_bytes=4443i,uptime_ns=312000000000i,used_cpu_sys=0.46,used_cpu_sys_children=0,used_cpu_user=0.416,used_cpu_user_children=0 1570207377000000000
```

#### Related

-   [Configure plugins](/telegraf/v1/configure_plugins/)
-   [Redis Sentinel Plugin Source](https://github.com/influxdata/telegraf/tree/v1.38.4/plugins/inputs/redis_sentinel/README.md)
