pmm監控postgresql資料庫
pmm監控postgresql資料庫詳細資訊請參考:
Configuring PostgreSQL for Monitoring:
https://www.percona.com/doc/percona-monitoring-and-management/conf-postgres.html
pmm安裝部署請參考:
http://blog.51cto.com/1937519/2319421
以下步驟為安裝和配置pmm client需要在被監控的postgresql資料庫服務上面操作:
1.安裝pmm client:
rpm -ivh https://www.percona.com/redir/downloads/percona-release/redhat/latest/percona-release-0.1-6.noarch.rpm
yum install pmm-client -y
2.設定資料庫,建立使用者:
ALTER SYSTEM SET track_io_timing=ON;
SELECT pg_reload_conf();
CREATE USER pmm_user WITH SUPERUSER ENCRYPTED PASSWORD 'secret';
3.配置監控伺服器
pmm-admin config --server 192.168.56.200 --server-user admin --server-password admin
或者:
pmm-admin config --server 192.168.56.200
4.新增作業系統監控:
pmm-admin add linux:metrics
5.新增postgresql資料庫監控:
pmm-admin add postgresql --host=localhost --password='secret' --port=5432 --user=pmm_user