PostgreSQL性能监控-pgWatch2
pgwatch2由到组件构成:
- pgwatch2 metrics gathering daemon written in Go 使用go语言编写的性能搜集
- A PostgreSQL database for holding the configuration about which databases and metrics to gather 使用postgres存储性能收集的配置
- InfluxDB Time Series Database for storing metrics 使用influx
- db时序数据库存储指标
- Grafana for
dashboarding (point-and-click, a set of predefined dashboards is provided) 使用Grafana作为展示报表
- A Web UI for administering the monitored DBs and metrics
and for showing some custom metric overviews 使用webpy开发的后台管理和配置界面
1.根据github上的readme,通过docker启动项目 https://github.com/cybertec-postgresql/pgwatch2.git
#检查docker是否启动
docker service start
#搜索pgwatch2
docker search pgwatch2
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
cybertec/pgwatch2 Flexible self-contained PostgreSQL metrics... 3
#下载pgwatch2代码
docker pull cybertec/pgwatch2
#注意:这里下载比较慢,一般需要重复尝试接近十遍才能下完
#在docker上打开一个容器运行pgwatch2
#-p IP:host_port:container_port,前者是host上的端口,后者是容器中暴露的端口
docker run -d -p 3000:3000 -p 5432:5432 -p 8083:8083 -p