Monitoring Redis

This guide helps you configure Stackdriver Monitoring to monitor Redis.

Redis is an open source advanced key-value store. It is often referred to as a data structure server since values can contain strings, hashes, lists, sets and sorted sets. For more information, visit redis.io.

Discovery

Stackdriver Monitoring discovers Redis services running in your Cloud Platform project if you have the following:

  • VM instances with redis in their names.
  • Firewall rules that open port 6379.

The discovered services are displayed on the Redis Services page in the Resources menu of the Stackdriver Monitoring Console.

After you install the monitoring agent and configure the Redis plugin on your instances, Stackdriver Monitoring populates the Redis Services page with inventory and metrics.

Configuring Redis monitoring

The Stackdriver Monitoring agent uses the hiredis client library to monitor Redis. After installing Redis, install hiredis by running the following commands:

  • RHEL & CentOS 6

        curl -O "https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm"
        sudo rpm -Uvh "epel-release-latest-6.noarch.rpm"
        sudo yum install hiredis
    
  • RHEL & CentOS 7

        curl -O "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
        sudo rpm -Uvh "epel-release-latest-7.noarch.rpm"
        sudo yum install hiredis
    
  • Ubuntu 16.04 LTS & Debian 9

        sudo apt-get install libhiredis0.13
    
  • Other Debian & Ubuntu

        sudo apt-get install libhiredis0.10
    

Configuring Stackdriver Monitoring

To monitor Redis, perform the following actions on your VM instance after installing the monitoring agent:

  1. Install the Redis configuration file, redis.conf, by running the following command:

    (cd /opt/stackdriver/collectd/etc/collectd.d/ \
      && curl -O "https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/redis.conf")
    

    If you are using a nonstandard host or port for Redis, edit redis.conf by following the instructions at the top of the file. For information on other Redis plugin options, see the collectd Wiki.

  2. Restart the monitoring agent by running the following command:

    sudo service stackdriver-agent restart
    

Redis metrics

For a list of the Redis metrics, see Redis agent metrics. The actual metrics collected, and the metrics available in the Stackdriver Monitoring menus, can vary.

Send feedback about...

Stackdriver Monitoring