组件性能数据采集--Redis数据采集

组件性能数据采集--Redis数据采集

Redis_exporter安装启动

下载解压

wget -c https://github.com/oliver006/redis_exporter/releases/download/v1.0.4/redis_exporter-v1.0.4.linux-amd64.tar.gz
 tar zxvf redis_exporter-v1.0.4.linux-amd64.tar.gz

启动

nohup ./redis_exporter -redis.addr ip:端口 -redis.password "密码" &

配置promet'heus

在prometheus.yml中添加配置

  - job_name: 'redis_exporter_targets'
    static_configs:
    - targets:
      - redis://120.48.31.148:6379
      - redis://120.48.21.34:6379
    params:
        check-keys: ["metrics:*"]
    metrics_path: /scrape
    relabel_configs:
     - source_labels: [__address__]
       target_label: __param_target
     - source_labels: [__param_target]
       target_label: instance
     - target_label: __address__
       replacement: 120.48.31.148:9121 #部署节点ip
  • 杀掉重启promethues
  • ID:11835
posted @ 2022-06-29 17:07  77的小白  阅读(55)  评论(0)    收藏  举报