Monitoring REDIS using Prometheus and Grafana

Let's Connect

Redis is a popular open-source in-memory database which can also be used as a message broker. It can be scaled (lineraly) to handle large volumes and throughputs of an order of 50 million ops per second. Redis can be considered as a key-value store, but the uniqueness in its design approach is that various data structures like List, Set, ZSET, and Hyperloglog among others. Monitoring REDIS is a key requirement in production environments. In this blog, we outline the basic steps to monitor a REDIS cluster using Prometheus REDIS Metric Exporter, Prometheus and Grafana. Around 100 different metrics are generated by REDIS instance. A detailed list of these can be found here.

The diagram below shows a high-level archicture of the components

Installing Prometheus


Exporter Configuration

Prometheus REDIS exporter can be downloaded from https://github.com/oliver006/redis_exporter/releases. Optionally you can clone the repository https://github.com/oliver006/redis_exporter/ and follow the build operations mentioned in the README file. Once downloaded you can run the binary

/redis_exporter –redis.addr= [IP ADDRESS OF THE REDIS HOST] –redis.user [USERNAME] –redis.password [REDIS PASSWORD]

Other command line options can be seen within the README file of the redis_exporter. Once the redis_exporter starts and connects to the REDIS instance, it can capture the metrics being exposed by the REDIS instance. Thereafter, we can configure prometheus to scrape values from the redis_exporter by specifying the configurations in prometheus.yml as shown below:

scrape_configs: ## config for the multiple Redis targets that the exporter will scrape – job_name: ‘redis_exporter_targets’ static_configs: – targets: – redis://first-redis-host:6379 – redis://second-redis-host:6379 – redis://second-redis-host:6380 – redis://second-redis-host:6381 metrics_path: /scrape relabel_configs: – source_labels: [address] target_label: param_target – source_labels: [param_target] target_label: instance – target_label: address replacement: [REDIS-EXPORTER-HOSTNAME]:9121

## config for scraping the exporter itself
- job_name: 'redis_exporter'
  static_configs:
    - targets:
      - <<REDIS-EXPORTER-HOSTNAME>>:9121

The Redis instances are listed under targets, the Redis exporter hostname is configured via the last relabel_config rule.

Grafana Dashboards

There are various dashboards available out of the box from the Grafana site [hhttps://grafana.com/grafana/dashboards/?search=REDIS], select the one which suits your monitoring requirements and copy its dashboard ID.

Inside Grafana you can import the dashboard using Import option as seen in the figures below:

Once imported you can view the dashboard as shown in figure below and start monitoring your REDIS installation.

The Power of Augmented Reality on Print Media

The Power of Augmented Reality on Print Media

In the evolving retail landscape, the integration of technology into traditional media is opening up new avenues for customer engagement. One of the most exciting developments is the use of Mixed Reality (MR) and, more specifically, Augmented Reality (AR) in print...

Streamline Your Data Analysis with Septa

Streamline Your Data Analysis with Septa

Tired of the coding roadblocks hindering your data exploration? Septa offers a revolutionary solution: AI-powered analysis that empowers anyone, regardless of technical expertise, to unlock the value of their data. Forget the days of: Struggling with complex SQL...

Exploring Real-world Use Cases for WebAR in Various Industries

Exploring Real-world Use Cases for WebAR in Various Industries

Augmented Reality (AR) has evolved beyond gaming and is making significant strides in various industries. WebAR offers accessibility and versatility, opening doors to a multitude of real-world applications. In this blog post, we'll delve into the diverse use cases of...

Security Considerations in WebAR Development: Protecting User Privacy

Security Considerations in WebAR Development: Protecting User Privacy

User trust is foundational for the success of any technology. Ensuring robust security measures in WebAR development not only protects users but also fosters trust, encouraging broader adoption of AR experiences. WebAR applications may involve real-time communication...

Let’s discuss your project!