A recent visit to the Redis website revealed not only a number of new features, but also a new visualization tool, RedisInsight. It’s great to try it out, but the key is support for new features like RedisJSON, which third party tools can’t match. Today take you to experience RedisInsight, really very useful!

SpringBoot e-commerce project mall (50K + STAR) address: github.com/macrozheng/…

RedisInsight profile

RedisInsight is a visual management tool for designing, developing and optimizing your Redis applications. Support dark and light color two themes, the interface is very cool! Supports String, Hash, Set, List, JSON and other data type management, and supports remote CLI function.

Below is a use of RedisInsight renderings, appearance level is good!

RedisMod profile

Redis has evolved over the years to become more than just an in-memory database. With RedisMod support, Redis is going to be very powerful. RedisMod includes the following enhancement modules:

  • RediSearch: a full-featured search engine;
  • RedisJSON: Native support for JSON types;
  • RedisTimeSeries: Sequential database support;
  • RedisGraph: Graph database support;
  • RedisBloom: Native support for probabilistic data;
  • RedisGears: programmable data processing;
  • RedisAI: Real-time model management and deployment for machine learning.

The installation

First we will use Docker to install Redis, pay attention to download the complete version of Redis RedisMod, which is the enhanced version of Redis with all modules built in!

  • Run the following command to download the RedisMod image:
docker pull redislabs/redismod:preview
Copy the code
  • Run the RedisMod service in the container.
docker run -p 6379:6379 --name redismod \
-v /mydata/redismod/data:/data \
-d redislabs/redismod:preview
Copy the code

use

With the Redis service installed, let’s try it out using RedisInsight!

The basic use

  • Download the RedisInsight installation package at redis.com/redis-enter…

  • You can install the software directly after downloading it. After the installation is complete, select it on the main screenAdd the Redis database;

  • chooseManually Adding a Database, enter the Redis service connection information;

  • After opening the connection, you can manage Redis. The installed Redis enhancement module will be displayed in the upper right corner.

  • Next we can add key-value pair data in Redis via RedisInsight, such as addStringType key-value pairs;

  • Add a Hash type and edit it individually.

  • Add a List that you can Push into when editing;

  • Add the JSON type, which can be supported after the RedisJSON module is installed.

  • For native JSON types, you can not only highlight previews, but also add, edit, and delete individual attributes.

  • RedisInsight also supports switching between dark and light themes, which can be changed in Settings.

CLI

  • If RedisInsight’s graphical interface doesn’t cut it for you, try itCLIFunction, click the CLI label in the lower left corner to open;

  • The thoughtful Redis official added the command in case you couldn’t remember itCommand HelperThe ability to find command documents, for example, we can searchhgetUsage of this command.

Profiler

Using the Profiler feature, we can view the command execution logs of Redis. For example, if we add a key value pair called testKey using RedisInsight, the Profiler will display the following log.

Visual monitoring

The Redis monitoring function of RedisInsight is relatively simple. I prefer to use Grafana to monitor Redis. For details about how to use Grafana, please refer to the Tutorial of Using Grafana.

Install Grafana

  • First download the Docker image of Grafana;
docker pull grafana/grafana
Copy the code
  • Run Grafana after downloading;
docker run -p 3000:3000 --name grafana \
-d grafana/grafana
Copy the code
  • Next download the Docker image for Prometheus;
docker pull prom/prometheus
Copy the code
  • in/mydata/prometheus/Create a configuration file for Prometheusprometheus.yml:
global:
  scrape_interval: 5s
Copy the code
  • Run Prometheus to install the configuration file in the hostprometheus.ymlTo mount into a container;
docker run -p 9090:9090 --name prometheus \
-v /mydata/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
-d prom/prometheus
Copy the code
  • Enter the Grafana container and installredis-datasourceThe grafana service needs to be restarted after installation.
docker exec -it grafana /bin/bash
grafana-cli plugins install redis-datasource
Copy the code

use

  • To connect to Redismod, use its container IP address. Run the following command to view the IP address of the redismod container.

  • Configure the Redis data source in Grafana and useadmin:adminAccount login, access address;http://192.168.3.105:3000/

  • To configure the Redis address information, use the CONTAINER IP address of Redismod.

  • Open Dashboard and select Redis;

  • Then you can see a very complete Redis monitoring dashboard, basically meet the monitoring needs of Redis.

conclusion

RedisInsight is an official visualization tool, and feels like the best Redis tool to use right now! Especially the support for new Redis features that no other tool can match! However, the monitoring function of Redis is really a little simple, so you need to use a professional monitoring tool Grafana to monitor Redis!

If you want to learn more about Redis, you can try the full Redis program (50K+Star) at github.com/macrozheng/…

The resources

Feel Redis official documents do special conscience, we strongly suggest you look!

The official document: developer.redis.com/explore/red…