Home > Database > Redis > body text

Introducing Redis performance monitoring

coldplay.xixi
Release: 2021-03-22 10:50:35
forward
1680 people have browsed it

Introducing Redis performance monitoring

redis_exporter prometheus grafana monitors Redis service indicators

    • 1.redis_exporter
    • 2 .prometheus
    • 3.grafana

This article uses redis_exporter prometheus grafana to monitor the Redis service. The reason is: low cost, less manual intervention, and direct downloading of the corresponding The components can communicate with each other simply by adding configurations, and the visual indicators are also relatively comprehensive.

Recommended (free): redis

The following is on a Linux machine with redis installed

1. redis_exporter

Download the program compressed file

wget https://github.com/oliver006/redis_exporter/releases/download/v0.28.0/redis_exporter-v0.28.0.linux-amd64.tar.gz
Copy after login

Unzip

tar zxf redis_exporter-v0.28.0.linux-amd64.tar.gz
Copy after login

cd into the directory

cd redis_exporter-v1.15.0.linux-amd64
Copy after login

Run the redis_exporter program directly Adding & means running in the background. The /redis_exporter & command accesses the localhost:6379 of the local machine by default. You need to specify the redis usage of other machines./redis_exporter ip:port &

./redis_exporter &
Copy after login

2, prometheus

The first step is to download the file as usual. The unzipped file (v2.7.1) can be modified to the version that needs to be installed. You can click https://github.com/prometheus/prometheus/releases to find the corresponding version. No.

wget https://github.com/prometheus/prometheus/releases/download/v2.7.1/prometheus-2.7.1.linux-amd64.tar.gz
Copy after login
tar zxf prometheus-2.7.1.linux-amd64.tar.gz
Copy after login

cd enters the directory and you will find a prometheus.yml configuration file. This configuration file corresponds to the service name, monitoring address and port of each service.

vim prometheus.yml
Copy after login

Open the configuration file and add the configuration of redis_exporter communication

   - job_name: 'prometheus'
     static_configs:
     - targets: ['localhost:9090'] #程序在本机开通的端口号 默认9090
  - job_name: 'redis'
    static_configs:
    - targets:
      - "IP:9121" #(安装redis_exporter的IP)
Copy after login

Run ps: Check if there is any process occupying port 9090

./prometheus &
Copy after login

http://ip:9090/targets Check if Success
Introducing Redis performance monitoring

3, grafana

No more nonsense

  wget https://dl.grafana.com/oss/release/grafana-6.0.0-beta1.linux-amd64.tar.gz
Copy after login
tar zxf grafana-6.0.0-beta1.linux-amd64.tar.gz
Copy after login
cd grafana-6.0.0-beta1
Copy after login
./grafana-server start
Copy after login

After startup: http://ip:300 Default User: admin, password: admin Then find data sources on the left
Introducing Redis performance monitoring

Configure the Url corresponding to your program address
Introducing Redis performance monitoring

The last step! Download the json template Import
https://grafana.com/api/dashboards/763/revisions/1/download

Introducing Redis performance monitoring
Upload
Introducing Redis performance monitoring
You can view it here Configure those service monitoring
Introducing Redis performance monitoring

Monitoring page

Introducing Redis performance monitoring

Introducing Redis performance monitoring

The above is the detailed content of Introducing Redis performance monitoring. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template