Grafana là open source application monitoring tool well-known và widely used. Và giờ, nhờ Redis Data Source for Grafana plug-in mới, nó work với Redis!
Với capability mới, DevOps practitioners và database admins dùng tool đã quen để dễ dàng tạo dashboard monitor Redis database và application data. Redis Data Source plug-in mới cho phép visualize RedisTimeSeries data và core Redis data types như Strings, Hashes, Sets, và hơn nữa. Cũng parse và display output Redis admin commands như SLOWLOG GET, INFO, CLIENT LIST.

Đừng bỏ lỡ blog khác series: How to Use the New Redis Data Source for Grafana Plug-in và 3 Real-Life Apps Built with Redis Data Source for Grafana
Getting started with the Redis Data Source for Grafana
Redis Data Source for Grafana mới connect đến bất kỳ Redis database — bao gồm open source Redis, Redis Enterprise, Redis Enterprise Cloud — và work với Grafana 7.0 trở lên. Nếu đã có Grafana 7.0, cài Data Source plug-in với grafana-cli command:
grafana-cli plugins install redis-datasource
Nếu chưa có Grafana hoặc muốn try data source mới, dễ dàng bắt đầu Grafana trong Docker container:
docker run -d -p 3000:3000 --name=grafana -e "GF_INSTALL_PLUGINS=redis-datasource" grafana/grafana
Setup Redis Data Source for Grafana dễ như làm việc với bất kỳ Grafana data source nào. Có additional configuration options, ngoài server address và port, bao gồm database password và Transport Layer Security (TLS) connection.

Sau initial configuration, bắt đầu tạo panels hiển thị Redis data! Redis Data Source plug-in hỗ trợ 3 command types: Redis commands, RedisTimeSeries commands, universal inputs.

1. Redis commands gồm predefined commands retrieve core Redis data types: Hashes, Sets, Strings, Streams, etc. Output command pre-formatted dễ dùng trong Grafana interface. Mode này cũng cho phép execute Redis admin commands: SLOWLOG GET, INFO, CLIENT LIST. Output của chúng trong newly introduced data frames, nên apply Grafana transformations modify standard output.

2. RedisTimeSeries commands cung cấp interface làm việc với RedisTimeSeries module. Hiện tại support 2 commands: TS.RANGE và TS.MRANGE, query range từ một hoặc nhiều time series. Ví dụ dưới show downloads Redis Data Source từ Grafana repository.

3. Universal input cho phép dùng commands khác, không supported 2 mode đầu. Lưu ý:
- Universal input không support tất cả Redis commands.
- Output các command không preformatted cho Grafana, nên một số Grafana features có thể không work correctly.
Real-time monitoring với INFO command
Để bắt đầu, cài Redis Monitoring Dashboard, built cho Grafana Data Source mới, và chơi với nó.
Monitoring dashboard dùng các section của INFO command với relevant Grafana transformation. Ngoài ra, có SLOWLOG panel, quickly identify slowest queries (có thể impact performance Redis database), và CLIENT LIST panel hiển thị info client connections.

Endless possibilities dùng Redis Data Source Plug-in mới cho Grafana; plan share more example dashboards, bao gồm fun application cho weather geeks, tuần tới. Stay tuned!