← All dashboards

Redis Overview

redis_exporter for redis

Redis_exporter

1.下载配置

​ 下载文件:redis_exporter-v1.31.4.linux-amd64.tar.gz ​ 解压:

shell
tar -C /home -xvf redis_exporter-v1.31.4.linux-amd64.tar.gz && cd /home
mv redis_exporter-v1.31.4.linux-amd64 redis_exporter

​ 配置systemd选项:

shell
vim /usr/lib/systemd/system/redis_exporter.service
[Unit]
Description=Redis exporter
After=network.target

[Service]
User=prometheus
Group=prometheus
ExecStart=/home/redis_exporter/redis_exporter -redis.addr 10.1xx.1.2xx:6379
Type=simple

[Install]
WantedBy=multi-user.target

​ 启动:

shell
systemctl daemon-reload
systemctl start redis_exporter
systemctl status redis_exporter
systemctl enable redis_exporter

2.配置prometheus

​ 添加至prometheus.yml:

  • shell
      - job_name: 'redis_exporter_targets'
        static_configs:
          - targets:
            - "10.1xx.1.2xx:6379"
            - "10.1xx.1.2xx:6379"
            - "10.1xx.1.2xx:6379"
              metrics_path: '/scrape'
              relabel_configs:
          - source_labels: [__address__]
            target_label: __param_target
          - source_labels: [__param_target]
            target_label: instance
          - target_label: __address__
            replacement: "10.1xx.1.2xx:9121"
    
      # config for scraping the exporter itself
    
      - job_name: 'redis_exporter'
        static_configs:
          - targets:
            - "10.19.1.2xx:9121"

Dashboard revisions

RevisionDecscriptionCreated

Reviews

Login or Sign up to write a review

Reviews from the community

Get this dashboard

Data source:

Dependencies:

Import the dashboard template:

or

Download JSON

Docs: Importing dashboards

Downloads: 162