diff --git a/dictionary.txt b/dictionary.txt index 506cf5d3..ce344ef3 100644 --- a/dictionary.txt +++ b/dictionary.txt @@ -1,3 +1,6 @@ +subfolder +1M +5M .env .inRadius 01FY9MWDTWW4XQNTPJ9XY9FPMN @@ -16,17 +19,20 @@ Caskroom CentOS7 Centos8 chmod +className CO2 CommandLineRunner Config CMS CRM CrudRepository +css Cypher datacenters datastore deserialize deserialized +dir DNS Dotenv Downey @@ -34,6 +40,7 @@ EntityStream ETL FTS geo-distributed +compressions consumer1 consumer2 consumer3 @@ -44,8 +51,10 @@ Cypher datacenter dataset DevOps +DOM Dotenv Downey +dropdown dually EntityStream formatters @@ -56,8 +65,11 @@ GeoLocation geo-replicated Geospatial Github +Gzip +GZIP Hemsworth Homebrew +html HyperLogLog HyperLogLogs IAM @@ -65,6 +77,8 @@ Initializer IoT IPs IaaS +IFrame +iframe inferencing Initializer integrations @@ -95,10 +109,12 @@ npm on-prem ORM OSS +PEM PeopleController PeopleControllerV1 PeopleRepository PeopleService +pluginName PowerShell preselected product-lifecycle @@ -114,6 +130,7 @@ RedisAI RedisGears redisinsight REDiss +redis-tutorials RHEL7 RHEL8 RSAL @@ -123,22 +140,26 @@ RedisConnectionProvider RedisDocumentRepository RedisGraph RedisInsight +redisinsight-plugin-sdk RedisJSON RedisTimeSeries RSALv2 SaaS SDK +set-max-intset-entries SKU SLOWLOG SMS SRANDMEMBER SSPL Scarlett +Serializer SkeletonApplication SortOrder.ASC Springfox SSPLv1 Stapleton's +stylesheet Sublicensing SwaggerUI Systemd @@ -146,6 +167,7 @@ tiering TTL TShark UI +ui ULID ULIDs Unlink @@ -178,12 +200,15 @@ createClient dataset david-paich.json dearmor +deserialization devtools dotenv +downsampling dr entityId entityStream epel-release +EVAL findAllPeople findByAddress_City findByAgeBetween @@ -199,6 +224,9 @@ geo-location getters gpg gpgcheck=1 +hardcode +hashtable +hashtables hmmm homeLoc homebrew @@ -228,6 +256,8 @@ locationRouter locationUpdated lon lsb_release +LUA +LZO macOS maxAge minAge @@ -243,7 +273,10 @@ personalStatement piƱa postalCode predictively +prev profiler +programmatically +RDB redis redis-benchmark redis-cli @@ -270,6 +303,7 @@ springfox-swagger-ui src staticName storages +subfolder sublicense subvalues sudo @@ -295,6 +329,38 @@ x86 XDEL XLEN xml +ziplist +ziplists zshrc REPL Slowlog +Lua +8k +3MB +85MB +redis-server +cron +serializer +MessagePack +Sanfilippo +Protobuf +bitset +Hyperloglog +SHA1 +sharding +datashards +gzip +IntSet +CRC32 +enums +hash-max-ziplist-entries +hash-max-ziplist-values +NamedTuple +MD5 +resharding +8kb +prev- +Snapcraft +FlatHub +Autodiscover +Used_memory_lua \ No newline at end of file diff --git a/docs/stack/about/index.md b/docs/stack/about/index.md index 3f523ebc..5cc74ee2 100644 --- a/docs/stack/about/index.md +++ b/docs/stack/about/index.md @@ -31,16 +31,17 @@ to help you build modern applications where performance is paramount. ## RedisInsight -The best way to get started with Redis Stack is with [RedisInsight](https://docs.redis.com/latest/ri/), a visualization tool for understanding and optimizing Redis data. +The best way to get started with Redis and Redis Stack is with [RedisInsight](/docs/ui/insight), a visualization tool for understanding and optimizing Redis data. RedisInsight allows you to: -* View data structures visually with the Browser tool and group keys according to their namespaces. -* Use CRUD on most Redis Stack data structures. -* Leverage Workbench, an advanced command-line interface with intelligent command auto-complete and complex data visualizations. -* Analyze traffic to Redis in real time using the Profiler tool. -* Use embedded Redis CLI at any time. -* Analyze memory usage with the Memory Analysis tool. -* Identify and troubleshoot bottlenecks using the Slowlog tool. + +* View data structures visually with the **Browser** tool and group keys according to their namespaces. +* Use CRUD on Redis and Redis Stack data structures. +* Leverage **Workbench**, an advanced command-line interface with visualizations for Redis Stack capabilities and data structures, including query and search capability, time series, and probabilistic data structures. +* Debug your application by analyzing every command sent to the Redis or Redis Stack instance in real time using the **Profiler** tool. +* Use embedded Redis CLI with command helper and syntax highlights. +* Optimize the performance and memory usage by generating personalized recommendations with the **Database Analysis** tool. +* Identify and troubleshoot bottlenecks using the **Slow Log** tool. ## Redis Stack packaging diff --git a/docs/ui/insight/_index.md b/docs/ui/insight/_index.md index 5ffe43f6..7a6557db 100644 --- a/docs/ui/insight/_index.md +++ b/docs/ui/insight/_index.md @@ -2,7 +2,7 @@ title: RedisInsight linkTitle: RedisInsight description: Visualize and optimize Redis data -weight: 3 +weight: 10 aliases: - /docs/stack/insight --- @@ -12,111 +12,12 @@ aliases: RedisInsight is a powerful tool for visualizing and optimizing data in Redis or Redis Stack, making real-time application development easier and more fun than ever before. RedisInsight lets you do both GUI- and CLI-based interactions in a fully-featured desktop GUI client. -### Download the latest RedisInsight - -* Download the latest RedisInsight [here](https://redis.com/redis-enterprise/redis-insight/) -* [RedisInsight Release Notes](https://github.com/RedisInsight/RedisInsight/releases) - -## Overview - -### Connection management - -* Automatically discover and add your local Redis or Redis Stack databases (that use standalone connection type and do not require authentication). -* Discover your databases in Redis Enterprise Cluster and databases with Flexible plans in Redis Cloud. -* Use a form to enter your connection details and add any Redis database running anywhere (including OSS Cluster, Sentinel). - - - -### Browser - -Browse, filter and visualize your key-value Redis data structures. -* [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) support for lists, hashes, strings, sets, sorted sets, and streams -* CRUD support for [RedisJSON](/docs/stack/json) -* Group keys according to their namespaces - - - -* View, validate, and manage your key values in a human-readable format using formatters that prettify and highlight data in different formats (for example, Unicode, JSON, MessagePack, HEX, and ASCII) in the Browser tool. - - - -### Profiler - -Analyze every command sent to Redis in real time. - - - -### CLI - -The CLI is accessible at any time within the application. -* Employs integrated help to deliver intuitive assistance -* Use together with a convenient command helper that lets you search and read on Redis commands. - - - -### Workbench - -Advanced command line interface with intelligent command auto-complete and complex data visualizations. -* Built-in guides: you can conveniently discover Redis and Redis Stack capabilities using the built-in guides. -* Command auto-complete support for all capabilities in Redis and Redis Stack. -* Visualizations of your [RediSearch](https://oss.redis.com/redisearch/) index, queries, and aggregations. -* Visualizations of your [RedisGraph](https://oss.redis.com/redisgraph/). - - - -* Visualizations of your [RedisTimeSeries](https://oss.redis.com/redistimeseries/) data. - - - -## Tools - -### Database analysis - -Use the database analysis tool to optimize the performance and memory usage of your Redis database. Check data type distribution and memory allocation and review the summary of key expiration time and memory to be freed over time. Inspect the top keys and namespaces sorted by consumed memory or key length and count of keys, respectively. Capture and track the changes in your database by viewing historical analysis reports. Next figure shows a sample database analysis report. - - - -### Redis Streams support - -Create and manage streams by adding, removing, and filtering entries per timestamp. To see and work with new entries, enable and customize the automatic refresh rate. - -View and manage the list of consumer groups. See existing consumers in a given consumer name as well as the last messages delivered to them. Inspect the list of pending messages, explicitly acknowledge the processed items, or claim unprocessed messages via RedisInsight. - - - -### Search capabilities - -If you're using Redis Stack's indexing, querying, or full-text search capabilities, RedisInsight provides UI controls to quickly and conveniently run search queries against a preselected index. You can also create a secondary index of your data in a dedicated pane. - - - -### Bulk actions - -Easily and quickly delete multiple keys of the same type and/or with the same key name pattern in bulk. To do so, in the List or Tree view, set filters per key type or key names and open the Bulk Actions section. The section displays a summary of all the keys with the expected number of keys that will be deleted based on the set filters. - -When the bulk deletion is completed, RedisInsight displays the results of this operation with the number of keys processed and the time taken to delete the keys in bulk. -Use bulk deletion to optimize the usage of your database based on the results from the Redis database analysis. - - - -### Slow Log - -The Slow Log tool displays the list of logs captured by the SLOWLOG command to analyze all commands that exceed a specified runtime, which helps with troubleshooting performance issues. Specify both the runtime and the maximum length of Slowlog (which are server configurations) to configure the list of commands logged and set the auto-refresh interval to automatically update the list of commands displayed. - - - -## Plugins - -With RedisInsight you can now also extend the core functionality by building your own data visualizations. See our [plugin documentation](https://github.com/RedisInsight/RedisInsight/wiki/Plugin-Documentation) for more information. - -## Telemetry - -RedisInsight includes an opt-in telemetry system. This help us improve the developer experience of the app. We value your privacy; all collected data is anonymized. - -## Feedback - To provide your feedback, [open a ticket in our RedisInsight repository](https://github.com/RedisInsight/RedisInsight/issues/new). -## License - RedisInsight is licensed under [SSPL](https://github.com/RedisInsight/RedisInsight/blob/main/LICENSE) license. + +{{% alert title="Note" color="warning" %}} + +RedisInsight includes an opt-in telemetry system. This helps us improve the developer experience of the app. We value your privacy, so all collected data is anonymized. You can disable this feature at any time. +{{% /alert %}} + diff --git a/docs/ui/insight/get-started.md b/docs/ui/insight/get-started.md new file mode 100644 index 00000000..cf77cc51 --- /dev/null +++ b/docs/ui/insight/get-started.md @@ -0,0 +1,113 @@ +--- +title: Get started with RedisInsight +linkTitle: Get started +description: Get started with RedisInsight +weight: 20 + +--- + +RedisInsight is available as a standalone download or [bundled with Redis Stack](/docs/stack/get-started/install). +Standalone downloads are available for Windows, MacOS, and Linux from the Redis Enterprise website and stores. + +## Install on Windows + +**From website** + +1. Download [RedisInsight](https://redis.com/redis-enterprise/redis-insight). + +1. Open the `RedisInsight-v2-win-installer.exe` file. + +1. Open the RedisInsight icon. + +**From stores** + +* Go to [Microsoft Windows Apps](https://apps.microsoft.com/store/detail/redisinsight/XP8K1GHCB0F1R2) and download the RedisInsight app. + +## Install on MacOS + +**From website** + +1. Download [RedisInsight](https://redis.com/redis-enterprise/redis-insight). + +1. Add RedisInsight to **Applications**. + +**Using Homebrew** + +``` +brew install --cask redisinsight +``` + +To start RedisInsight from your Terminal, run this command. + +``` +redisinsight +``` + +**From stores** + +* Go to [Apple Store](https://apps.apple.com/us/app/redisinsight/id6446987963) and download the RedisInsight app. + +## Install on Linux + +**From website** + +1. Download [RedisInsight](https://redis.com/redis-enterprise/redis-insight). + +1. Open the Linux command line and install the package. + + * For the `.AppImage` package: + + - To make your downloaded file executable, run: + + ``` + chmod a+x RedisInsight-v2-linux-x86_64.AppImage + ``` + + - To start RedisInsight, open the Linux command line and navigate to the directory containing the downloaded file. Then, run: + + ``` + ./RedisInsight-v2-linux-x86_64.AppImage + ``` + + * For Debian, run: + + ``` + sudo apt install ./RedisInsight-v2-linux-amd64.deb + ``` + + +**From stores** + +* You can install RedisInsight from [Snapcraft](https://snapcraft.io/redisinsight) or [FlatHub](https://flathub.org/apps/details/com.redis.RedisInsight) using instructions available at those sites. + +## Add a Redis database + +If you already have a Redis database, you can: + +* Add it manually by specifying connection details. + +* Auto-discover your Redis Enterprise Cluster or Cloud databases, as well as your Redis Sentinel instances. + +If you need a free Redis database with modern data models and processing engines, select **Try Redis Cloud with enhanced database capabilities**. + +If you already have a Redis database up and running locally, RedisInsight automatically searches for it and adds it if found. + +Once added, your database appears with **Database Alias**, **Host:Port**, **Connection Type**, **Modules**, and **Last connection**. + + + +## Add a new key + +Select **+Key** to add a new key. + +Once added, the dashboard UI shows the hash key details. + + + +## Change the color + +RedisInsight allows you to specify the color theme of your choice. Select **Settings > General** and change the appearance between **Dark Theme** and **Light Theme**. + +## Explore + +To explore ways you can interact with your database, see [Tools](/docs/ui/insight/tools) and [Tutorials](/docs/ui/insight/tutorials). diff --git a/docs/ui/insight/images/CLI.png b/docs/ui/insight/images/CLI.png index b1b76248..92f6b0ec 100644 Binary files a/docs/ui/insight/images/CLI.png and b/docs/ui/insight/images/CLI.png differ diff --git a/docs/ui/insight/images/Profiler.png b/docs/ui/insight/images/Profiler.png index 4469c370..9a42aaee 100644 Binary files a/docs/ui/insight/images/Profiler.png and b/docs/ui/insight/images/Profiler.png differ diff --git a/docs/ui/insight/images/Workbench_Graph.png b/docs/ui/insight/images/Workbench_Graph.png index a0699a33..8e8df7cc 100644 Binary files a/docs/ui/insight/images/Workbench_Graph.png and b/docs/ui/insight/images/Workbench_Graph.png differ diff --git a/docs/ui/insight/images/Workbench_TimeSeries.png b/docs/ui/insight/images/Workbench_TimeSeries.png index 01400cfa..adefc622 100644 Binary files a/docs/ui/insight/images/Workbench_TimeSeries.png and b/docs/ui/insight/images/Workbench_TimeSeries.png differ diff --git a/docs/ui/insight/images/add_database.png b/docs/ui/insight/images/add_database.png new file mode 100644 index 00000000..1fce5762 Binary files /dev/null and b/docs/ui/insight/images/add_database.png differ diff --git a/docs/ui/insight/images/add_key.png b/docs/ui/insight/images/add_key.png new file mode 100644 index 00000000..fc66473a Binary files /dev/null and b/docs/ui/insight/images/add_key.png differ diff --git a/docs/ui/insight/images/create_time_series.png b/docs/ui/insight/images/create_time_series.png new file mode 100644 index 00000000..6b5281e7 Binary files /dev/null and b/docs/ui/insight/images/create_time_series.png differ diff --git a/docs/ui/insight/images/database_recommendations.png b/docs/ui/insight/images/database_recommendations.png new file mode 100644 index 00000000..6c63c892 Binary files /dev/null and b/docs/ui/insight/images/database_recommendations.png differ diff --git a/docs/ui/insight/images/expiration-time.png b/docs/ui/insight/images/expiration-time.png new file mode 100644 index 00000000..110b9c70 Binary files /dev/null and b/docs/ui/insight/images/expiration-time.png differ diff --git a/docs/ui/insight/images/insight_streams.png b/docs/ui/insight/images/insight_streams.png new file mode 100644 index 00000000..e20cab91 Binary files /dev/null and b/docs/ui/insight/images/insight_streams.png differ diff --git a/docs/ui/insight/images/memory-allocation.png b/docs/ui/insight/images/memory-allocation.png new file mode 100644 index 00000000..4defc2e6 Binary files /dev/null and b/docs/ui/insight/images/memory-allocation.png differ diff --git a/docs/ui/insight/images/time_series_compaction.png b/docs/ui/insight/images/time_series_compaction.png new file mode 100644 index 00000000..714d91cf Binary files /dev/null and b/docs/ui/insight/images/time_series_compaction.png differ diff --git a/docs/ui/insight/images/workbench_tutorial.png b/docs/ui/insight/images/workbench_tutorial.png new file mode 100644 index 00000000..8ce56e57 Binary files /dev/null and b/docs/ui/insight/images/workbench_tutorial.png differ diff --git a/docs/ui/insight/plugins/_index.md b/docs/ui/insight/plugins/_index.md new file mode 100644 index 00000000..40cff338 --- /dev/null +++ b/docs/ui/insight/plugins/_index.md @@ -0,0 +1,18 @@ +--- +title: "RedisInsight plugins" +linkTitle: Plugins +description: Create your own custom data visualizations +weight: 40 +aliases: +--- + +With RedisInsight, you can extend the core functionality by building your own data visualizations. + +Redis can hold a range of different data types. Visualizing these data types in a format that's convenient to you for validation and debugging is paramount. +You can now easily extend the core functionality of RedisInsight independently by building your own custom visualization plugin. + +Data visualization provided by the plugin is rendered in the **Workbench** results area and is based on the executed command. +A Redis command can generate its own custom data visualization. + +For your reference, see the [plugin package example](https://github.com/RedisInsight/RedisInsight/tree/main/redisinsight/ui/src/packages/clients-list). Running the `CLIENT LIST` command presents the output in a tabular format for easier reading. + diff --git a/docs/ui/insight/plugins/plugin-development.md b/docs/ui/insight/plugins/plugin-development.md new file mode 100644 index 00000000..596f6f39 --- /dev/null +++ b/docs/ui/insight/plugins/plugin-development.md @@ -0,0 +1,202 @@ +--- +title: "Develop RedisInsight plugins" +linkTitle: Develop plugins +description: Guidance on developing RedisInsight plugins +weight: 30 +aliases: +--- + +To encapsulate plugin scripts and styles, plugin visualization in **Workbench** is rendered using IFrame, as described in +the main plugin script and the stylesheet (if it is specified in the `package.json`). +IFrame also includes basic styles. + +## Plugin structure + +Each plugin should have a unique name with all its files loaded to a separate folder inside the default `plugins` folder. For more information, see [Install RedisInsight plugins](/docs/ui/insight/plugins/plugin-installation). + +{{% alert title="Note" color="warning" %}} + +Default plugins are located inside the application. + +{{% /alert %}} + +### Files + +`package.json` should be located in the root folder of your plugins. All other files can be included in a sub-folder. + +* **pluginName/package.json** *(required)*: Manifest of the plugin +* **pluginName/{anyName}.js** *(required)*: Core script of the plugin +* **pluginName/{anyName}.css** *(optional)*: File with styles for the plugin visualizations +* **pluginName/{anyFileOrFolder}** *(optional)*: Specify any other file or folder inside the plugin folder +for the core module script to use. Example: `pluginName/images/image.png`. + +## `package.json` structure + +To use the plugin, the `package.json` file must include these required fields: + + + + + + + + + + + + + + +
namePlugin name. Use the folder name as the plugin name in the package.json.
mainRelative path to the core script of the plugin. Example: ./dist/index.js
visualizations + Array of objects to visualize the results in the Workbench. +

+ Required fields in visualizations: +
    +
  • id: Visualization ID
  • +
  • name: Visualization name to display in Workbench
  • +
  • activationMethod: Name of the exported function to call when +this visualization is selected in the Workbench
  • +
  • + matchCommands: Array of commands to use the visualization for. Supports regex string. + Example: `["CLIENT LIST", "FT.*"]` +
  • +
+
+ +You can specify the path to a CSS file in the `styles` field. If specified, +this file will be included inside the IFrame plugin. + +Simple example of the `package.json` file with required and optional fields: + +```json +{ + "author": { + "name": "Redis Ltd.", + "email": "support@redis.com", + "url": "https://redis.com/redis-enterprise/redis-insight" + }, + "description": "Show client list as table", + "styles": "./dist/styles.css", + "main": "./dist/index.js", + "name": "client-list", + "version": "0.0.1", + "scripts": {}, + "visualizations": [ + { + "id": "clients-list", + "name": "Table", + "activationMethod": "renderClientsList", + "matchCommands": [ + "CLIENT LIST" + ], + "description": "Example of client list plugin", + "default": true + } + ], + "devDependencies": {}, + "dependencies": {} +} +``` + +## Core script of the plugin + +The core (required) script contains a function and its export (functions, for multiple visualizations). +The script runs after the relevant visualization is selected in **Workbench**. + +The following function receives `Props` of the executed commands: + +```typescript +interface Props { + command: string; // executed command + data: Result[]; // array of results (one item for Standalone) +} + +interface Result { + response: any; // response of the executed command + status: 'success' | 'fail'; // response status of the executed command +} + +const renderVisualization = (props: Props) => { + // Do your magic +} + +export default { renderVisualization } +``` + +Each plugin iframe has basic styles that match the RedisInsight application, including fonts and color schemes. + +It is recommended to use the React & [Elastic UI library](https://elastic.github.io/eui/#/) for +consistency with plugin visualizations and the entire application. + +For a plugin example, see: + +* [Client List Plugin README](https://github.com/RedisInsight/Packages/blob/main/clients-list-example/README.md) +* [Client List Plugin dir](https://github.com/RedisInsight/Packages/blob/main/clients-list-example/) + +### Available parameters + +Additional information provided to the plugin iframe is included in the `window.state` +inside of the plugin script. + +```javascript +const { config, modules } = window.state +const { baseUrl, appVersion } = config + +// modules - the list of modules of the current database +// baseUrl - url for your plugin folder - can be used to include your assets +// appVersion - version of the RedisInsight application +``` + +### Plugin rendering + +To render the plugin visualization, the iframe with basic HTML is generated and +then populated with relevant scripts and styles. To render the HTML data, use the existing +DOM element `#app` or create your own DOM elements. + +The rendered iframe also includes `theme_DARK` or `theme_LIGHT` `className` on `body` to indicate the application theme used. + +**JavaScript** + +```javascript +const renderVisualization = (props) => { + const { command, data = [] } = props; + const [{ result, status }] = data + document.getElementById('app') + .innerHTML = ` +

Executed command:

+

${command}

+

Result of the command

+

${result}

+

Status of the command

+

${status}

+ ` +} + +export default { renderVisualization } +``` + +**React** + +```javascript +import { render } from 'react-dom' +import App from './App' + +const renderVisualization = (props) => { + const { command, data = [] } = props + const [{ result, status }] = data + render( + , + document.getElementById('app') + ) +} + +// This is a required action - export the main function for execution of the visualization +export default { renderVisualization } +``` + +## Plugin communication + +Use the [redisinsight-plugin-sdk](https://www.npmjs.com/package/redisinsight-plugin-sdk), which is a third party library, +to communicate with the main app. + +For a list of methods and their descriptions, see the [README.md](https://github.com/RedisInsight/RedisInsight/blob/main/redisinsight/ui/src/packages/clients-list/README.md). diff --git a/docs/ui/insight/plugins/plugin-installation.md b/docs/ui/insight/plugins/plugin-installation.md new file mode 100644 index 00000000..11275339 --- /dev/null +++ b/docs/ui/insight/plugins/plugin-installation.md @@ -0,0 +1,34 @@ +--- +title: "Install RedisInsight plugins" +linkTitle: Install plugin +description: Learn how to add Workbench plugins to RedisInsight +weight: 20 +aliases: +--- + +{{% alert title="Note" color="warning" %}} + +To avoid automatic execution of malicious code when adding new Workbench plugins, use files from trusted authors only. + +{{% /alert %}} + +1. Download the plugin for the Workbench. +1. Open the `plugins` folder with the following path: + * For MacOS: `/.redisinsight-preview/plugins` + * For Windows: `C:/Users/{Username}/.redisinsight-preview/plugins` + * For Linux: `/.redisinsight-preview/plugins` +1. Add the folder that contains the plugin to the `plugins` folder. + +To see the uploaded plugin visualizations in the command results, reload the Workbench +page and run the relevant Redis command. + +## Usage + +The plugin may contain different visualizations for any Redis commands. +To see command results in the uploaded plugin visualization: + +1. Open RedisInsight. +1. Open the database. +1. Open **Workbench**. +1. Run the Redis command for the plugin visualization. +1. Select the plugin visualization to use if this visualization was not set by default. \ No newline at end of file diff --git a/docs/ui/insight/tools/_index.md b/docs/ui/insight/tools/_index.md new file mode 100644 index 00000000..4822b54b --- /dev/null +++ b/docs/ui/insight/tools/_index.md @@ -0,0 +1,9 @@ +--- +title: RedisInsight tools +linkTitle: Tools +description: Learn about RedisInsight features +weight: 30 + +--- + +RedisInsight makes it easy to query, visualize, and interactively work with Redis capabilities. Whether using Redis Stack, Redis Enterprise Software, or Redis Enterprise Cloud, RedisInsight allows you to manipulate complex data models such as documents, graphs, and time series. Explore queryable JSON documents, full-text search, probabilistic data structures, and more. diff --git a/docs/ui/insight/tools/browser.md b/docs/ui/insight/tools/browser.md new file mode 100644 index 00000000..95aadd72 --- /dev/null +++ b/docs/ui/insight/tools/browser.md @@ -0,0 +1,26 @@ +--- +title: Browser +linkTitle: Browser +description: Visualize and manage your data structures +weight: 10 + +--- + +**Browser** allows you to visualize and interact with the data stored in your Redis and Redis Stack database. + +With the **Browser** tool, you can: + +* Explore Redis keys, their values, and metadata +* Perform create, read, update, and delete (CRUD) operations on strings, hashes, sets, sorted sets, lists, streams, and JSON. +* Navigate through and analyze your list of keys quicker by grouping keys per their namespaces using the Tree view, or use filters per key name or Redis data type to find the keys you need. + + + +The Browser tool also helps you observe, validate, and manage your key values in a human-readable format using formatters that prettify and highlight data in different formats (for example, Unicode, JSON, MessagePack, HEX, ASCII, and so on), as well as automatically decompress your data to display it in a human-readable format, supporting GZIP, LZ4, SNAPPY, and other compressions. + + + +Leverage the [Search capabilities](/docs/ui/insight/tools/search) to see and work with found keys and their values, or use a dedicated form to create a secondary index. + +Delete keys in bulk from your Redis or Redis Stack database based on the filters set in Browser using [Bulk actions](/docs/ui/insight/tools/bulk-actions). + diff --git a/docs/ui/insight/tools/bulk-actions.md b/docs/ui/insight/tools/bulk-actions.md new file mode 100644 index 00000000..45ff1da8 --- /dev/null +++ b/docs/ui/insight/tools/bulk-actions.md @@ -0,0 +1,23 @@ +--- +title: "Bulk actions" +linkTitle: Bulk actions +description: Manage your database actions in bulk +weight: 10 +aliases: +--- + +With bulk actions, you can delete multiple keys with the same type, the same key name pattern, or both in bulk. + +To delete multiple keys in bulk: + + 1. In the List or Tree view, filter by key type or key name. + + 1. Select **Bulk Actions** to display the keys and the expected number of keys to be deleted based on the configured filters. + + 1. Select **Delete**. + +When the bulk deletion is completed, RedisInsight displays the results of this operation with the number of keys processed and the time taken to delete the keys in bulk. +Use bulk deletion to optimize the usage of your database based on the results from the Redis database analysis. + + + diff --git a/docs/ui/insight/tools/cli.md b/docs/ui/insight/tools/cli.md new file mode 100644 index 00000000..a9700f6d --- /dev/null +++ b/docs/ui/insight/tools/cli.md @@ -0,0 +1,22 @@ +--- +title: CLI +linkTitle: CLI +description: Interact with your database in RedisInsight using CLI +weight: 10 + +--- + +While RedisInsight provides a comprehensive graphical interface for managing Redis or Redis Stack, there are many advanced operations that you can perform only by using a command-line interface. For such cases, you can use RedisInsight CLI, which supplements the graphical interface and provides you a greater flexibility and control over your database when you run Redis commands. + +RedisInsight CLI is accessible at any time within your database, allowing you to run Redis commands while: + +* Investigating the list of keys in **Browser**. +* Receiving or publishing messages in pub/sub. +* Troubleshooting performance issues. +* Optimizing the performance and memory usage of your database based on recommendations displayed in [Database Analysis](/docs/ui/insight/tools/database-analysis). + +RedisInsight CLI includes a type-ahead help to assist with the syntax of Redis commands. Also, RedisInsight CLI is integrated with Command Helper which allows you to read about your Redis command used in CLI, or filter and search for any Redis command to learn more about its purpose and syntax. + +Try executing Redis commands as shown here. + + \ No newline at end of file diff --git a/docs/ui/insight/tools/connection-management.md b/docs/ui/insight/tools/connection-management.md new file mode 100644 index 00000000..2efce2e4 --- /dev/null +++ b/docs/ui/insight/tools/connection-management.md @@ -0,0 +1,18 @@ + +--- +title: Connection management +linkTitle: Connections +description: Manage connections in RedisInsight +weight: 10 + +--- + +Before viewing and interacting with your data, optimizing your Redis or Redis Stack database, or troubleshooting performance issues, you must first add the database so RedisInsight can connect to it. +While all your local Redis or Redis Stack databases with the standalone connection type and without any authentication will be automatically identified and added to your list of database connections when RedisInsight launches for the first time, there are many cases when you need to add database connections to work with them via RedisInsight. +To do so, you can use one of the available options: + +* Discover your databases in Redis Enterprise Cluster and databases with Flexible plans in Redis Cloud, as well as primary groups from Redis Sentinel. +* Use a form to enter your connection details and add any Redis database running anywhere. +* Connect to your database connections via SSH tunnels using a password or private key in the PEM format. + + \ No newline at end of file diff --git a/docs/ui/insight/tools/database-analysis.md b/docs/ui/insight/tools/database-analysis.md new file mode 100644 index 00000000..1a25d9b6 --- /dev/null +++ b/docs/ui/insight/tools/database-analysis.md @@ -0,0 +1,54 @@ +--- +title: "Database Analysis" +linkTitle: Database Analysis +description: Learn how RedisInsight helps to optimize your database +weight: 10 +aliases: +--- + +Use the **Database Analysis** tool to optimize the performance and memory usage of your Redis database. Check data type distribution and memory allocation and review the summary of key expiration time and memory to be freed over time. Inspect the top keys and namespaces sorted by consumed memory or key length and count of keys, respectively. Capture and track the changes in your database by viewing historical analysis reports. + +The following image shows a sample database analysis report. + + + +Use recommendations based on developer best practices to: + +* Reduce memory usage +* Improve application performance +* Increase the security of your database + +Recommendations are generated specifically for your Redis or Redis Stack database. + + + +## Optimize database memory and performance + +While investigating ways to optimize memory and performance or inspecting high memory usage in your Redis or Redis Stack database, you may need to find the biggest keys or most memory-intensive data structures or analyze the allocation of data structures and compare it with previous intervals. + +The **Database analysis** tool can help you to: + +* Check data type distribution and memory allocation. +* Review the summary of key expiration time and memory to be freed over time. +* Inspect the top keys and namespaces sorted by consumed memory or key length and count of keys, respectively. +* Capture and track the changes in your database by viewing historical analysis reports. + +After you launch RedisInsight following [Get started](/docs/ui/insight/get-started): + +* Add your Redis database instance or create a new, free Redis Enterprise Cloud database. +* To test the features, open the database. Then, go to **Analysis tools > Database Analysis** and generate a new report. + +RedisInsight automatically analyzes up to 10,000 keys in your database and generates a report with diagrams that contains a summary of your database. + +## Review database analysis report + +Next diagram contains information about memory allocation and the number of keys per data structure in your Redis or Redis Stack database. You get an overview of the most popular and memory-intensive data structures. + + + +The next diagram summarizes the expiration time in your database and the amount of memory to be freed over time. + +To optimize memory usage, configure the expiration time to allow Redis to automatically remove keys that are no longer needed. Setting the expiration time is useful for cache invalidation, because cached data is refreshed periodically to avoid stale data and keep the cache up to date. + + + diff --git a/docs/ui/insight/tools/profiler.md b/docs/ui/insight/tools/profiler.md new file mode 100644 index 00000000..2d9c8d24 --- /dev/null +++ b/docs/ui/insight/tools/profiler.md @@ -0,0 +1,29 @@ +--- +title: Profiler +linkTitle: Profiler +description: Analyze commands in real time +weight: 10 + +--- + +Debug and monitor the performance and security of your Redis or Redis Stack instance using the **Profiler** tool. + +**Profiler** is a tool based on Redis `MONITOR` command that streams back every command processed by the Redis server in real-time. + +**Profiler** can help you to: + +* Debug issues with your database. +* Diagnose issues and identify problematic commands. +* Identify performance issues and bottlenecks. +* Detect suspicious activity such as unauthorized access attempts or unusual commands being sent to the Redis server. +* Spot bugs in an application both when using Redis or Redis Stack as a database and as a distributed caching system. + +{{% alert title="Note" color="warning" %}} + +Because `MONITOR` streams back all commands, its use comes at a cost of reducing the throughput of your database. Therefore, avoid running **Profiler** in production databases. + +{{% /alert %}} + +RedisInsight also allows you to download the file with all the logs streamed back to analyze them outside of the application. Before starting the **Profiler**, enable saving to save the logs to a `.txt` file. + + \ No newline at end of file diff --git a/docs/ui/insight/tools/search.md b/docs/ui/insight/tools/search.md new file mode 100644 index 00000000..75941fa0 --- /dev/null +++ b/docs/ui/insight/tools/search.md @@ -0,0 +1,21 @@ +--- +title: "Search capabilities" +linkTitle: Search +description: RedisInsight allows you to index and perform search queries +weight: 10 +aliases: +--- + +Search for keywords and phrases within your documents stored as Redis hashes or JSON with dedicated UI controls to run search queries against a preselected index. +If you use the search capability and would like to use a dedicated UI in RedisInsight: + +1. In **Browser**, open **Search by Values of Keys**. +1. Select your index. +1. Insert the search query. +1. Run the query. + +RedisInsight displays the list of keys found in the List or Tree view. + + + +RedisInsight also provides UI controls to create a new secondary index of your data. To create such an index, specify basic index information. \ No newline at end of file diff --git a/docs/ui/insight/tools/slow-log.md b/docs/ui/insight/tools/slow-log.md new file mode 100644 index 00000000..fe63a817 --- /dev/null +++ b/docs/ui/insight/tools/slow-log.md @@ -0,0 +1,27 @@ +--- +title: Slow Log +linkTitle: Slow Log +description: Display logs captured by the SLOWLOG command +weight: 10 + +--- + +Use **Slow Log** to: + +* Monitor and improve the performance of your Redis and Redis Stack databases. +* Identify Redis commands that are running slowly and that can negatively impact the performance of your database. +* Identify other issues such as increased latency or reduced throughput. + +To get started: + +1. Select **Analysis Tools > Slow Log**. + +1. In **Configure**, specify both the runtime and the maximum length of `SLOWLOG` to configure the list of commands logged. + +1. Under **Last refresh** dropdown, set the auto-refresh interval to `Auto Refresh` to automatically update the list of commands displayed. + +Using `SLOWLOG`, RedisInsight captures the list of slow commands. + +Investigate slow commands so you can optimize your Redis or Redis Stack database and ensure faster response times and improved application performance. + + diff --git a/docs/ui/insight/tools/streams-support.md b/docs/ui/insight/tools/streams-support.md new file mode 100644 index 00000000..0b21a369 --- /dev/null +++ b/docs/ui/insight/tools/streams-support.md @@ -0,0 +1,13 @@ +--- +title: "Redis streams support" +linkTitle: Streams +description: Learn how RedisInsight helps to create and manage streams +weight: 10 +aliases: +--- + +Create and manage streams by adding, removing, and filtering entries per timestamp. To see and work with new entries, enable and customize the automatic refresh rate. + +View and manage the list of consumer groups. See existing consumers in a given consumer name as well as the last messages delivered to them. Inspect the list of pending messages, explicitly acknowledge the processed items, or claim unprocessed messages via RedisInsight. + + \ No newline at end of file diff --git a/docs/ui/insight/tools/workbench.md b/docs/ui/insight/tools/workbench.md new file mode 100644 index 00000000..343ba19c --- /dev/null +++ b/docs/ui/insight/tools/workbench.md @@ -0,0 +1,19 @@ +--- +title: Workbench +linkTitle: Workbench +description: Intelligent command auto-complete and complex data visualizations +weight: 10 + +--- + +**Workbench** is an advanced command-line interface that lets you run commands against your Redis or Redis Stack database. It: + +* Supports auto-complete and syntax highlighting for Redis commands. +* Provides data visualizations for many Redis and Redis Stack capabilities, such as search capability, graph and time series, and `CLIENT LIST` command. + +* Allows you to extend the core functionality by building your own data visualizations. For more information, see [Plugins](/docs/ui/insight/plugins). + +Use built-in interactive guides and tutorials to discover and learn Redis and Redis Stack features and capabilities. + +Share your Redis expertise with your team and the wider community by building custom RedisInsight tutorials. Use our [instructions](https://github.com/RedisInsight/Tutorials) to describe your implementations of Redis for other users to follow and interact with in the context of a connected Redis database. +Let the community discover your content by labeling your GitHub repository [redis-tutorials](https://github.com/topics/redis-tutorials). diff --git a/docs/ui/insight/tutorials/_index.md b/docs/ui/insight/tutorials/_index.md new file mode 100644 index 00000000..166f23b5 --- /dev/null +++ b/docs/ui/insight/tutorials/_index.md @@ -0,0 +1,10 @@ +--- +title: "RedisInsight tutorials" +linkTitle: Tutorials +description: Examples of building and interacting with databases in RedisInsight +weight: 60 +aliases: + - /docs/stack/insight/tutorials/insight-stream-consumer +--- + +RedisInsight allows you to browse, filter, and visualize key-value Redis data structures. It supports CRUD operation for lists, hashes, strings, sets, sorted sets, and so on. You can take advantage of built-in examples in Workbench to learn about the data structures. We'll guide you through one of those examples here and show you other practical ways to use RedisInsight with your databases. diff --git a/docs/ui/insight/tutorials/images/consumer.png b/docs/ui/insight/tutorials/images/consumer.png deleted file mode 100644 index 85784c39..00000000 Binary files a/docs/ui/insight/tutorials/images/consumer.png and /dev/null differ diff --git a/docs/ui/insight/tutorials/images/insight_streams.png b/docs/ui/insight/tutorials/images/insight_streams.png deleted file mode 100644 index 68cdc2de..00000000 Binary files a/docs/ui/insight/tutorials/images/insight_streams.png and /dev/null differ diff --git a/docs/ui/insight/tutorials/images/stream.png b/docs/ui/insight/tutorials/images/stream.png deleted file mode 100644 index 842dcf91..00000000 Binary files a/docs/ui/insight/tutorials/images/stream.png and /dev/null differ diff --git a/docs/ui/insight/tutorials/insight-stream-consumer.md b/docs/ui/insight/tutorials/nodejs-example.md similarity index 50% rename from docs/ui/insight/tutorials/insight-stream-consumer.md rename to docs/ui/insight/tutorials/nodejs-example.md index 12bf2ce6..45fb04b5 100644 --- a/docs/ui/insight/tutorials/insight-stream-consumer.md +++ b/docs/ui/insight/tutorials/nodejs-example.md @@ -1,59 +1,12 @@ --- -title: "Manage streams and consumer groups in RedisInsight" -linkTitle: Streams -description: Learn how to manage streams and consumer groups in RedisInsight -weight: 1 +title: "Streams with Node.js" +linkTitle: Streams with Node.js +description: Monitor temperature and humidity from sensors +weight: 30 +aliases: --- -A _stream_ is an append-only log file. -When you add data to it, you cannot change it. -That may seem like a disadvantage; however, a stream serves as a log or single source of truth. -It can also be used as a buffer between processes that work at different speeds and do not need to know about each other. -For more conceptual information about streams, see [Redis Streams](/docs/manual/data-types/streams). - -In this topic, you will learn how to add and work with streams as well as consumer groups in RedisInsight. - -Here's a stream that models temperature and humidity sensors. Processes interacting with the stream perform one of two roles: _consumer_ and _producer_. -The point of a stream is that it's not going to end, so you cannot capture whole datasets and do some processing on them. - -In this stream, sensors are considered _producers_, which broadcast data. -A _consumer_ reads from the stream and does some work on it. -For example, if the temperature is above a certain threshold, it puts a message out to turn on the air conditioner in that unit or notify the maintenance. - - - - -It is possible to have multiple consumers doing different jobs, one measuring humidity, and another taking temperature measurements over periods of time. -Redis stores a copy of the entire dataset in memory, which is a finite resource. -To avoid runaway data, streams can be trimmed when you add something to them. -When adding to a stream with `XADD`, you can optionally specify that the stream should be trimmed to a specific or approximate number of the newest entries, or to only include entries whose ID is higher than the ID specified. -You can also manage the storage required for streaming data using key expiry. For example, by writing each day's data to its own stream in Redis and expiring each stream's key after a period of time, say a week. -An ID can be any number, but each new entry in the stream must have an ID whose value is higher than the last ID added to the stream. - -## Adding new entries - -Use `XADD` with `*` for the ID to have Redis automatically generate a new ID for you consisting of a millisecond precision timestamp, a dash and a sequence number. For example `1656416957625-0`. Then supply the field names and values to store in the new stream entry. - -There are a couple of ways of retrieving things. You can retrieve entries by time range or you could ask for everything that's happened since a timestamp or ID that you specify. Using a single command you can ask for anything from 10:30 until 11:15 am on a given day. - -## Consumer groups - -A more realistic use case would be a system with many temperature sensors whose data Redis puts in a stream, records the time they arrive, and orders them. - - - -On the right side we have two consumers that read the stream. One of them is alerting if the temperature is over a certain number and texting the maintenance crew that they need to do something, and the other is a data warehouse that is taking the data and putting it into a database. - -They run independently of each other. -Up in the right, we have another sort of task. -Let's assume that alerting and data warehouse are really fast. -You get a message whether the temperature is larger than a specific value, which might take a millisecond. -And alerting can keep up with the data flow. -One way you can scale consumers is _consumer groups_, which allows multiple instances of the same consumer or same code to work as a team to process the stream. - -## Managing streams in RedisInsight - -You can add a stream in RedisInsight in two ways: create a new stream or add to an existing stream. +You can add a [stream](/docs/data-types/streams) in RedisInsight in two ways: create a new stream or add to an existing stream. To create a stream, start by selecting the key type (stream). You cannot set time to live (TTL) because it cannot be put on a message in a stream; it can only be done on a Redis key. Name the stream _mystream_. @@ -66,28 +19,26 @@ Now you have a stream that appears in the **Streams** view and you can continue RedisInsight runs read commands for you so you can see the stream entries in the **Streams** view. And the **Consumer Groups** view shows each consumers in a given consumer group and the last time Redis allocated a message, what the ID of it was and how many times that process has happened, and whether a consumer has you have told Redis that you are finished working with that task using the `XACK` command. -## Monitor temperature and humidity from sensors in RedisInsight - -This example shows how to bring an existing stream into RedisInsight and work with it. +This example shows how to interact with a stream built in Node.js. -### Setup +## Step 1: Setup 1. Install [RedisInsight](https://redis.com/redis-enterprise/redis-insight/?_ga=2.48624486.1318387955.1655817244-1963545967.1655260674#insight-form). 2. Download and install [Node.js](https://nodejs.org/en/download/) (LTS version). 3. Install [Redis](https://redis.io/download/). In Docker, check that Redis is running locally on the default port 6379 (with no password set). 4. Clone the [code repository](https://github.com/redis-developer/introducing-redis-talk) for this example. See the [README](https://github.com/redis-developer/introducing-redis-talk/tree/main/streams) for more information about this example and installation tips. -5. On your command-line, navigate to the folder containing the code repository and install the Node.js package manager (npm). +5. On your command-line, navigate to the folder containing the code repository and install `npm`. - {{< highlight bash >}} +```javascript npm install - {{< / highlight >}} +``` -### Run the producer +## Step 2: Run the producer To start the producer, which will add a new entry to the stream every few seconds, enter: -{{< highlight bash >}} +```javascript npm run producer > streams@1.0.0 producer @@ -99,17 +50,17 @@ Added as 1632771056648-0 Adding reading for location: 96, temperature: 15.4, humidity: 70 Added as 1632771059039-0 ... -{{< / highlight >}} +``` The producer runs indefinitely. Select `Ctrl+C` to stop it. You can start multiple instances of the producer if you want to add entries to the stream faster. -### Run the consumer +## Step 3: Run the consumer To start the consumer, which reads from the stream every few seconds, enter: -{{< highlight bash >}} +```javascript npm run consumer > streams@1.0.0 consumer @@ -124,29 +75,29 @@ Finished working with entry 1632771056648-0 Reading stream... Received entry 1632771059039-0: [ 'location', '96', 'temp', '15.4', 'humidity', '70' ] -{{< / highlight >}} +``` The consumer stores the last entry ID that it read in a Redis string at the key `consumer:lastid`. It uses this string to pick up from where it left off after it is restarted. Try this out by stopping it with `Ctrl+C` and restarting it. Once the consumer has processed every entry in the stream, it will wait indefinitely for instances of the producer to add more: -{{< highlight bash >}} +```javascript Reading stream... No new entries since entry 1632771060229-0. Reading stream... No new entries since entry 1632771060229-0. Reading stream... -{{< / highlight >}} +``` Stop it using `Ctrl+C`. -### Run a consumer group +## Step 4: Run a consumer group A consumer group consists of multiple consumer instances working together. Redis manages allocation of entries read from the stream to members of a consumer group. A consumer in a group will receive a subset of the entries, with the group as a whole receiving all of them. When working in a consumer group, a consumer process must acknowledge receipt/processing of each entry. Using multiple terminal windows, start three instances of the consumer group consumer, giving each a unique name: -{{< highlight bash >}} +```javascript npm run consumergroup consumer1 > streams@1.0.0 consumergroup @@ -159,45 +110,42 @@ Received entry 1632771059039-0: [ 'location', '96', 'temp', '15.4', 'humidity', '70' ] Acknowledged processing of entry 1632771059039-0. Reading stream... -{{< / highlight >}} +``` In a second terminal: -{{< highlight bash >}} +```javascript npm run consumergroup consumer2 -{{< / highlight >}} +``` And in a third: -{{< highlight bash >}} +```javascript npm run consumergroup consumer3 -{{< / highlight >}} +``` The consumers will run indefinitely, waiting for new messages to be added to the stream by a producer instance when they have collectively consumed the entire stream. Note that in this model, each consumer instance does not receive all of the entries from the stream, but the three members of the group each receive a subset. -### View the stream in RedisInsight +## Step 5: View the stream in RedisInsight 1. Launch RedisInsight. -2. Select `localhost:6379` -3. Select **STREAM**. Optionally, select full screen from the upper right corner to expand the view. - - +1. Select `localhost:6379` +1. Select **STREAM**. Optionally, select full screen from the upper right corner to expand the view. + You can now toggle between **Stream** and **Consumer Groups** views to see your data. -As mentioned earlier in this topic, a stream is an append-only log so you can't modify the contents of an entry, but you can delete an entire entry. +A stream is an append-only log so you can't modify the contents of an entry, but you can delete an entire entry. A case when that's useful is in the event of a so-called _poison-pill message_ that can cause consumers to crash. You can physically remove such messages in the **Streams** view or use the `XDEL` command at the command-line interface (CLI). You can continue interacting with your stream at the CLI. For example, to get the current length of a stream, use the `XLEN` command: -{{< highlight bash >}} +``` XLEN ingest:temphumidity -{{< / highlight >}} - -Use streams for auditing and processing events in banking, gaming, supply chain, IoT, social media, and so on. +``` -## Related topics +## Learn more -- [Redis Streams](/docs/manual/data-types/streams) -- [Introducing Redis Streams with RedisInsight, node.js, and Python](https://www.youtube.com/watch?v=q2UOkQmIo9Q) (video) \ No newline at end of file +* [Redis Streams](/docs/manual/data-types/streams) +* [Introducing Redis Streams with RedisInsight, node.js, and Python](https://www.youtube.com/watch?v=q2UOkQmIo9Q) (video). \ No newline at end of file diff --git a/docs/ui/insight/tutorials/workbench-tutorial.md b/docs/ui/insight/tutorials/workbench-tutorial.md new file mode 100644 index 00000000..37e8bcc8 --- /dev/null +++ b/docs/ui/insight/tutorials/workbench-tutorial.md @@ -0,0 +1,41 @@ +--- +title: "Workbench tutorials" +linkTitle: Workbench tutorials +description: Interact with Workbench tutorials +weight: 20 +aliases: +--- + +Tutorials you find in **Workbench** allow you interact with some sample data in a few taps. For this orientation, we will use an example called _Redis for time series_. + + + +If you haven't done so, [add a database](/docs/ui/insight/get-started#add-a-redis-database). To try the tutorials, you can create a database manually using RedisInsight instructions. Then navigate to this example in Workbench and read the introduction. Next, you will create time series for bike shops. + +## Step 1: Create a time series per bike shop + +Select the **Create time series per shop** button to create five time series for bike shops. + + + +This creates a time series per shop, tracking the total amount of all sales. As you can tell from the labels, each time series is marked `east` or `west` to query bike sales by time periods, shop, region, or across all shops. +Each shop has a numbered id. You also add the `DUPLICATE_POLICY SUM` argument to describe what should be done when two events in the same time series share the same timestamp. + +Here, we assume two sales happen at exactly the same time, resulting in a value that is the sum of two sales values. +If you're running this example from your command line, you'll see Redis `OK` responses. But, you can also follow along in Workbench by selecting the right arrow. + +Because the metrics are collected with a millisecond timestamp, you can compact the time series into sales per hour. + +## Step 2: Compact time series + +Redis Stack supports downsampling with these aggregations: `avg`, `sum`, `min`, `max`, `range`, `count`, `first`, and `last`. If you want to keep all of your raw data points indefinitely, your data set grows linearly over time. However, if your use case allows you to have less fine-grained data further back in time, you can apply downsampling. This allows you to keep fewer historical data points by aggregating raw data for a given time window using a given aggregation function. + +Select the **Time series compaction** button to create five time series for bike shops. + + + +Follow the remaining steps in Workbench to load more data points and get sales based on different queries. + +## Create your own Workbench tutorial + +Try other data structure examples in Workbench. Share your Redis expertise with your team and the wider community by building custom RedisInsight tutorials. Use our [instructions](https://github.com/RedisInsight/Tutorials) to describe your implementations of Redis for other users to follow and interact with in the context of a connected Redis database.