Visualize Redis database keys using RedisInsight Browser Tool

RedisInsight is a 100% free Redis GUI that allows you to visualise, monitor, and optimize while developing your applications with Redis. It provides an intuitive and efficient GUI for Redis allowing developers like you to interact with your databases and manage your data.

RedisInsight Browser lets you explore keys in your redis server. You can add, edit and delete a key. You can even update the key expiry and copy the key name to be used in different places of the application.

In order to understand the capabilities of the browser tool, let us take a simple example and demonstrate capabilities of each of browse tool options:

Step 1: Create a Redis Database#

Follow this link to create Redis database

Step 2: Download RedisInsight#

To install RedisInsight on your local system, you need to first download the software from Redis Labs website.

Click this link to access a form that allows you to select the operating system of your choice.

My Image

Run the installer. After the web server starts, open http://YOUR_HOST_IP:8001 and add a Redis database connection.

Select "Connect to a Redis database" My Image

Enter the requested details, including Name, Host (endpoint), Port, and Password. Then click “ADD REDIS DATABASE”.

Step 3: Open "Browser Tool"#

alt_text

Step 4: Importing keys#

Let us import a user database( 6k keys). This dataset contains users stored as Redis Hash.

Users

The user hashes contain the following fields:

  • user:id : The key of the hash.
  • first_name : First Name.
  • last_name : Last name.
  • email : email address.
  • gender : Gender (male/female).
  • ip_address : IP address.
  • country : Country Name.
  • country_code : Country Code.
  • city : City of the user.
  • longitude : Longitude of the user.
  • latitude : Latitude of the user.
  • last_login : EPOC time of the last login.

Step 5: Cloning the repository#

git clone https://github.com/redis-developer/redis-datasets
cd redis-datasets/user-database

Importing the user database:

redis-cli -h localhost -p 6379 < ./import_users.redis

Refresh the keys database by clicking as shown below:

Click on “Scan More” to scan all 6k keys

alt_text

You can get a real-time view of the data in your Redis database as shown below:

alt_text

Select any key in the key database and the results gets displayed in the right hand side that includes Fields and values.

alt_text

Step 6. Adding a new key#

alt_text

Enter key name, field and value.

alt_text

Step 7. Searching the hash key#

You can search the key by “user:9999” and you will see the result.

alt_text

Let us add fields for user:9999 as shown below:

You can even search by adding “*” and typing the first few letters.

alt_text

Step 8: Filter keys by Data Type#

alt_text

Step 9: Setting up the Expiry value#

Let us set it to 2 seconds and you won’t be able to search for the same key as it gets expired.

alt_text

Step 10: Using CLI#

RedisInsight CLI lets you run commands against a redis server. You don’t need to remember the syntax - the integrated help shows you all the arguments and validates your command as you type.

> HMGET user:3333 first_name last_name city
1) "Myrlene"
2) "McGrane"
3) "Qinghu"

alt_text

Further References#