Home > Database > Redis > body text

Detailed explanation of Redis performance monitoring

coldplay.xixi
Release: 2021-04-09 17:09:51
forward
1739 people have browsed it

Detailed explanation of 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, download the corresponding components directly, just add They can communicate with each other after configuration, and the visual indicators are 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
Detailed explanation of 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
Detailed explanation of Redis performance monitoring

Configure the Url corresponding to your program address
Detailed explanation of Redis performance monitoring

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

Detailed explanation of Redis performance monitoring
Upload
Detailed explanation of Redis performance monitoring
You can view it here Configure those service monitoring
Detailed explanation of Redis performance monitoring

Monitoring page

Detailed explanation of Redis performance monitoring

Today is New Year’s Eve, I wish you all a Happy New Year in advance!

The above is the detailed content of Detailed explanation of 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