Plugins 〉Redis

Data Source
commercial

Redis

  • Overview
  • Installation
  • Change log
  • Related content

Redis Data Source for Grafana

Dashboard

Grafana 7 Radix Redis Enterprise Redis Data Source Redis Application plug-in Go Report Card CI codecov

Summary

Introduction

What is the Redis Data Source for Grafana?

The Redis Data Source for Grafana is a plug-in that allows users to connect to the Redis database and build dashboards in Grafana to easily monitor Redis and application data. It provides an out-of-the-box predefined dashboard, but also lets you build customized dashboards tuned to your specific needs.

What Grafana version is supported?

Grafana 7.1 and later with a new plug-in platform supported.

Does this Data Source require anything special configured on the Redis databases?

Data Source can connect to any Redis database. No special configuration is required.

Does this Data Source support Redis Cluster and Sentinel?

Redis Cluster and Sentinel supported since version 1.2.

Does this Data Source support Redis modules?

Data Source supports:

How to connect to Redis logical database

Please use /db-number or ?db=db-number in the Data Source URL to specify the database number as defined in the Schema.

redis://redis-server:6379/0

How to build Data Source

To learn how to build Redis Data Source from scratch and register in new or existing Grafana please take a look at BUILD instructions.

Getting Started

Install using grafana-cli

Use the grafana-cli tool to install from the commandline:

grafana-cli plugins install redis-datasource

Run using docker

docker run -d -p 3000:3000 --name=grafana -e "GF_INSTALL_PLUGINS=redis-datasource" grafana/grafana

Run using docker-compose

Project provides docker-compose.yml to start Redis with all Redis Labs modules and Grafana.

docker-compose up

Open Grafana in your browser and configure Redis Data Source. You can add as many data sources as you want to support multiple Redis databases.

Datasource

There are certain settings that can be configured based on your own setup:

  • Grafana port
  • Data Source URL

Configure Grafana port in docker-compose.yml

If standard port 3000 is occupied by another application update the port to bind Grafana to

    ports:
      - '3000:3000'

Configure Data Source URL in provisioning/datasources/redis.yaml

If Redis is running and listening on localhost:6379 no changes are required

    url: redis://localhost:6379

If Redis is running as Docker container on MacOS, please update host to host.docker.internal

    url: redis://host.docker.internal:6379

If Redis is running as Docker container on Linux, please update host to redis

    url: redis://redis:6379

Run using docker-compose for development

Data Source have to be built following BUILD instructions before starting using docker-compose/dev.yml file.

docker-compose -f docker-compose/dev.yml up

Supported commands

Data Source supports various Redis commands using custom components and provides a unified interface to query any command.

Query

Template variables

Template variables can query any command and use other variables as parameters.

Variables

Learn more

Feedback

We love to hear from users, developers and the whole community interested by this plugin. These are various ways to get in touch with us:

  • Ask a question, request a new feature and file a bug with GitHub issues.
  • Star the repository to show your support.

Contributing

  • Fork the repository.
  • Find an issue to work on and submit a pull request.
  • Could not find an issue? Look for documentation, bugs, typos, and missing features.

License

  • Apache License Version 2.0, see LICENSE.

For more information, visit the docs on plugin installation.

Change Log

1.3.1 (2021-02-04)

Features / Enhancements

  • Add Unit test for Golang Backend #119
  • Remove "Unknown command" error from response for custom panels #125
  • Update Radix to 3.7.0 and other backend dependencies #128
  • Redis client, unit-tests refactoring and new unit-tests. #129
  • Implement CLI-mode similar to Redis-cli #135
  • Added support for errorstats features coming in redis 6.2; Extended commandstats fields with failedCalls and rejectedCalls #137
  • Add command to support the panel to show the biggest keys (TMSCAN) #133
  • Add RedisGears commands (RG.PYSTATS, RG.DUMPREGISTRATIONS, RG.PYEXECUTE) #136
  • Implement XRANGE and XREVRANGE commands #148
  • Add Client Type tooltip #149
  • Refactoring Query Editor #151
  • Add handling different frame type for Streaming data source #152
  • Update tooltip for RedisTimeSeries Label Filter #155
  • Update Loading state for Streaming for Grafana 7.4 #158
  • Update Grafana SDK 0.86 to fix race conditions #160
  • Add Redis Graph module (GRAPH.QUERY, GRAPH.SLOWLOG) #157

Bug fixes

  • Experiencing memory leak in Grafana docker seemingly stemming from this plugin #116
  • All Redis Datasource timeout when one is not reachable #73

1.3.0 (2021-01-05)

Breaking changes

  • HGETALL returns hash fields in a row similar to HGET, HMGET to support streaming. Previously each hash field returned as row.
  • Time Bucket for RedisTimeSeries TS.RANGE and TS.MRANGE was updated from string to integer. To fix the dashboard JSON:
    • Search for "bucket"="X"
    • Remove quotes
  • RedisTimeSeries TS.RANGE command was updated to have legend and value override similar to TS.MRANGE. Previous legend defined field's name.
  • key parameter for command like GET, HGET, SMEMBERS was updated to keyName to avoid conflicts. To fix the dashboard JSON:
    • Search for "key"="X"
    • Replace to "keyName"="X"

Features / Enhancements

  • Update description and GitHub issues #83
  • Add RediSearch FT.INFO command #97
  • Add HMGET Command #98
  • Update release workflow #99
  • Update Grafana dependencies to 7.3.5 #100
  • Update Grafana SDK 0.80.0 #101
  • Update data source icon and refactoring #102
  • Update field's name for HGET command to align with HMGET #103
  • Update HGETALL command to return fields and support streaming similar to HGET, HMGET #104
  • Add tests for React Config and Query editors #105
  • Remove CircleCI and move to Github Actions #106
  • Update Bucket's type (string->number) and add type values for Aggregation and Info sections #108
  • Add tests for React Data Source #113
  • Update Bucket to Time Bucket in Query Editor #114
  • Check if string value is a number when streaming #115
  • Add Tests Coverage #117
  • Add Empty Array when no values returned similar to redis-cli #120, #121
  • Add test data for backend testing #122

Bug fixes

  • Fix "NOAUTH Authentication required" error with sentinel #109
  • Add Value Label to TS.RANGE command similar to TS.MRANGE #110
  • Update default configuration parameters for Data Source #111
  • Update Key to KeyName to avoid conflict in the Explore tab #112

1.2.1 (2020-10-24)

Features / Enhancements

  • Support Connecting to Redis via Unix Socket #58
  • Support Redis 6 ACL authentication #60
  • Update Grafana dependencies to 7.2.0 #66
  • Update and optimize dashboards for Grafana 7.2.0 #67
  • Add Streaming for Command Statistics #68
  • Add Size parameter for SLOWLOG GET #79
  • Update GitHub org to RedisGrafana #80

Bug fixes

  • Plugin health check failed for ARM on Linux #61
  • Timeseries data time stamp truncated to seconds #64

1.2.0 (2020-08-26)

Features / Enhancements

  • Added docker cmd line option to start in README #31
  • How to query a specific database inside the same Redis single node #34
  • Update docker-compose to load datasource from the repository and add development file #39
  • Use "ScopedVars" when applying template variables #37 (fix for #36)
  • Refactoring to support new commands and modules #42
  • Add support for TS.GET, TS.INFO, and TS.QUERYINDEX commands #45
  • Add Redis dashboard to support multiple Redis instances #49
  • Plugin executable missing for arm64 architecture #48 (Grafana SDK: https://github.com/grafana/grafana-plugin-sdk-go/pull/221)
  • Return 0 for all buckets with 0 counts on time-series TS.RANGE queries #50
  • Add Redis Cluster support and update monitoring dashboard #52
  • Connection issue to Redis deployed in k8s (Sentinel) #38
  • MRANGE: add fill zero option #53
  • Add Streaming capabilities to visualize INFO command #57

Bug fixes

  • Slowlog returns 'No data' for Redis 3.0.6 #33
  • Fix backend lint issues #41
  • ts.mrange returns no data when label has spaces within #44

1.1.2 (2020-07-29)

Features / Enhancements

  • Remove developer jargon from README #30
  • Redis Datasource is Unsigned. K8S+Helm installation #29

1.1.1 (2020-07-28)

Features / Enhancements

  • Screenshots added to plugin.json and updated in the README
  • CHANGELOG added to display on the Plugin page

1.1.0 (2020-07-24)

Features / Enhancements

  • Updated to Grafana 7.1.0 and the latest version of Radix #27
  • Add dashboard as a part of datasource #25
  • Add Field config units to the response #26

1.0.0 (2020-07-13)

Features / Enhancements

  • Initial release based on Grafana 7.0.5.
  • Allows configuring password, TLS, and advanced settings.
  • Supports Redis commands: CLIENT LIST, GET, HGET, HGETALL, HKEYS, HLEN, INFO, LLEN, SCARD, SLOWLOG GET, SMEMBERS, TTL, TYPE, XLEN.
  • Supports RedisTimeSeries commands: TS.MRANGE, TS.RANGE.
  • Provides Redis monitoring dashboard.