Ready to get going? Start your 14 days free trial today

Start free trial

Have an account? Sign in

Send data via Redis Metrics to your Logstash instance provided by Logit.io

Redis Metrics

Collect and ship Redis server metrics to Logstash and Elasticsearch.

Metricbeat is a lightweight shipper that helps you monitor your Redis servers by collecting metrics running on the Redis server. Configure Metricbeat using the pre-defined examples below to collect and ship Redis service metrics and statistics to Logstash or Elasticsearch.

Step 1 - Install MetricbeatCopy

First we need to install Metricbeat.

deb (Debian/Ubuntu)

sudo apt-get install apt-transport-https
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/oss-6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list

sudo apt-get update && sudo apt-get install metricbeat

rpm (Redhat/Centos)

sudo rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
echo "[elastic-6.x]
name=Elastic repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md" | sudo tee /etc/yum.repos.d/elastic-beats.repo

sudo yum install metricbeat

sudo chkconfig --add metricbeat

macOS

curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-6.7.2-darwin-x86_64.tar.gz
tar xzvf metricbeat-6.7.2-darwin-x86_64.tar.gz
My OS isn't here! Don't see your system? Check out the official downloads page for more options (including 32-bit versions).

Step 2 - Locate configuration fileCopy

deb/rpm /etc/metricbeat/metricbeat.yml
macOS <EXTRACTED_ARCHIVE>/metricbeat.yml

Step 3 - Configure outputCopy

We'll be shipping to Logstash so that we have the option to run filters before the data is indexed.
Comment out the elasticsearch output block.

## Comment out elasticsearch output
#output.elasticsearch:
#  hosts: ["localhost:9200"]

Uncomment and change the logstash output to match below.

output.logstash:
    hosts: ["your-logstash-host:your-ssl-port"]
    loadbalance: true
    ssl.enabled: true

Step 4 - Enable moduleCopy

There are several built in metricbeat modules you can use. To enable the Apache module, run the following:

deb/rpm

metricbeat modules list
metricbeat modules enable redis

macOS

./metricbeat modules list
./metricbeat modules enable redis

Step 5 - Configure moduleCopy

Each module has its own configuration file where different metricsets can be enabled / disabled. Locate the configuration file for the Redis module.

deb/rpm /etc/metricbeat/modules.d/redis.yml

macOS ~/<EXTRACTED_ARCHIVE>/modules.d/redis.yml

By default the metricsets are disabled. To enable or disable a metric simply comment or uncomment the line out.

- module: redis
  metricsets:
  # - info
  # - keyspace
  period: 10s

Step 6 - Start MetricbeatCopy

Ok, time to start gathering metrics!

deb/rpm

sudo systemctl enable metricbeat
sudo systemctl start metricbeat

macOS

./metricbeat

Step 7 - CompatibilityCopy

The Redis metricsets were tested with Redis 3.2.12, 4.0.11 and 5.0-rc4, and are expected to work with all versions >= 3.0.

Toggle View

Expand View

Return to Search