Grafana+Prometheus:监控Redis

 

在上一节的基础上:Grafana+Prometheus:容器化运行Grafana+Prometheus

1、增加redis exporter

#下载镜像
docker pull oliver006/redis_exporter
#运行
docker run -d \
--name redis_exporter \
-p 9121:9121 \
oliver006/redis_exporter --redis.addr redis://公网ip:6379

2、更改prometheus的配置文件prometheus.yml,并重新启动一个容器运行

global 
  scrape_interval: 60s evaluation_interval: 60s scrape_configs:
- job_name: prometheus static_configs: - targets: ['localhost:9090'] labels: instance: prometheus - job_name: linux static_configs: - targets: ['公网ip:9100'] labels: instance: localhost - job_name: 'redis' static_configs: - targets: ['公网ip:9121'] labels: instance: redis

3.redis监控模板可以选763

posted @ 2020-09-12 12:33  -零  阅读(337)  评论(0编辑  收藏  举报