Prometheus + Grafana 监控 Redis
2018-05-25 15:41
846 查看
Prometheus安装
wget https://github.com/prometheus/prometheus/releases/download/v2.1.0/prometheus-2.1.0.linux-amd64.tar.gz
tar -zxvf prometheus-2.1.0.linux-amd64.tar.gz -C /prometheus --strip-components=1
cd /prometheus
# Start Prometheus. # By default, Prometheus stores its database in ./data (flag --storage.tsdb.path). ./prometheus --config.file=prometheus.yml
在浏览器输入localhost:9090
Grafana安装
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3-1.x86_64.rpm sudo yum localinstall grafana-4.6.3-1.x86_64.rpm
启动服务
$ sudo service grafana-server start
开机启动
$ sudo /sbin/chkconfig --add grafana-server
安装完成。浏览器打开 http://192.168.0.15:3000 ,输入默认用户名密码 (admin/admin) 可以进入 Grafana 。
Prometheus 和 Grafana 对接
Prometheus: URL: localhost:9090/即可完成 Prometheus 和 Grafana 的对接。
在redis服务器安装node_exporter和redis_exporter
redis_exporter安装
wget https://github.com/oliver006/redis_exporter/releases/download/v0.15.0/redis_exporter-v0.15.0.linux-amd64.tar.gz
tar -zxvf redis_exporter-v0.15.0.linux-amd64.tar.gz -C /prometheus_exporters --strip-components=1
wget https://github.com/prometheus/node_exporter/releases/download/v0.15.2/node_exporter-0.15.2.linux-amd64.tar.gz
tar -zxvf redis_exporter-v0.15.2.linux-amd64.tar.gz -C /prometheus_exporters --strip-components=1
启动
cd /prometheus_exporters
./node_exporter &
./redis_exporter redis//localhost:6379 & -web.listenaddress 0.0.0.0:9121
配置prometheus.yml 加入
global: scrape_interval: 15s external_labels: monitor: 'codelab-monitor'scrape_configs: - job_name: 'prometheus' scrape_interval: 5s static_configs: - targets: ['localhost:9090'] - job_name: redis static_configs: - targets: ['xxx.xxx.xxx.xxx:9121'] labels: instance: db1注意prometheus.yml中缩进不能有tab。
导入json模板
下载grafana的redis的prometheus-redis_rev1.json模板wget https://grafana.com/api/dashboards/763/revisions/1/download在grafana中导入json模板 启动redis在redis安装路径执行
src/redis-server
阅读更多
相关文章推荐
- prometheus+grafana 监控生产环境机器的系统信息、redis、mongodb以及jmx
- 基于prometheus+grafana 搭建监控mysql redis mongodb等
- 使用 prometheus + grafana 监控 ceph 集群
- 使用Prometheus+grafana打造高逼格监控平台 推荐
- prometheus+grafana构建应用监控(一)
- prometheus+grafana+docker 监控tomcat jvm
- Prometheus+Grafana搭建监控系统
- 安装prometheus+grafana监控mysql redis kubernetes等
- Spring Boot 应用可视化监控(Prometheus + Grafana)
- Docker+ cadvisor+Prometheus+Grafana监控部署实践
- 使用Prometheus+Grafana监控MySQL实践
- Prometheus+Grafana搭建监控系统(一)
- [k8s]prometheus+grafana监控node和mysql(普罗/grafana均vm安装)
- Kubernetes + Prometheus + Grafana 集群监控
- Prometheus+Grafana打造Mysql监控平台
- prometheus+grafana构建应用监控(二)
- prometheus+grafana构建应用监控(三)
- prometheus+grafana构建应用监控(四)
- 使用prometheus + Hawkular 监控你的应用
- Docker 监控- Prometheus VS Cloud Insight