Greenplum Command Center
greenplum 监控工具(Greenplum Command Center,GPCC)是Greenplum原生自动化运维工具,它面向Greenplum数据库管理员和使用者,基于浏览器的可视化图形界面,将集群内部复杂的监控信息直观地展示出来,提供了丰富的监控管理功能,从而降低Greenplum的使用门槛,减少运维作业的人力投入和学习成本。
所以,安装GPCC是必要的。
版本介绍
Greenplum 集群版本:Greenplum v6.17.0
GPCC版本:greenplum-cc-web-4.13.0-gp5-rhel7-x86_64.zip
软件下载
Greenplum DB下载 :https://network.pivotal.io/products/vmware-tanzu-greenplum#/releases/917259/file_groups/4523
GPCC 官方下载链接:https://network.pivotal.io/products/gpdb-command-center/
文档说明 https://gpcc.docs.pivotal.io/620/welcome.html
找到您的GP版本,选择对应的GPCC版本。
安装 Greenplum DB
见前文 [GreenPlum 集群安装](https://lework.github.io/2021/08/05/greenplum-install/
安装GPCC-web
将下载的GPCC压缩文件上传到系统,并解压。
$ unzip greenplum-cc-web-4.13.0-gp5-rhel7-x86_64.zip
请注意,执行gpccinstall命令涉及了root用户和gpadmin用户的权限问题。
因为gpccinstall命令需要在Greenplum集群每个节点都创建一个新文件夹,所以,执行命令一定要对目录有读写权限。命令的默认安装路径是/usr/local下。所以,
- 如果,自己规划的路径,并且路径的各级目录是属于gpadmin,那么全程都可以用gpadmin系统用户执行。
- 如果,要安装在/usr/local下,需要用root用户将/usr/local的权限改成gpadmin:
# 使用root用户登录,在所有的节点执行:
[root@gp-master ~]# mkdir /usr/local/greenplum-cc-6.5.0
[root@gp-master ~]# ln -s /usr/local/greenplum-cc-6.5.0 /usr/local/greenplum-cc
[root@gp-master ~]# chown -R gpadmin:gpadmin /usr/local/greenplum-cc*
进入到GPCC的解压目录,并执行命令
[gpadmin@gp-master ~]$ /tmp/greenplum-cc-web-6.5.0-gp6-rhel7-x86_64/gpccinstall-6.5.0 -W
Password for GPDB user gpmon: [输入密码]
Where would you like to install Greenplum Command Center? (Default=/usr/local)
[回车]
Greenplum Command Center will be installed in /usr/local/greenplum-cc-6.5.0
What would you like to name this installation of Greenplum Command Center? (Default=gpcc)
[回车]
What port would you like the gpcc webserver to use? (Default=28080)
[回车]
Would you like to enable SSL/TSL? Yy/Nn (Default=Y)
n [输入]
********************************************************************************
* WARNING: Your connections to GPCC will be insecure. *
********************************************************************************
Please choose a display language (Default=English)
1. English
2. Chinese
3. Korean
4. Russian
5. Japanese
2 [输入]
Could not detect [metrics_collector] in shared_preload_libraries
Please add it to enable GPCC metrics collection
Would you like to continue with gpcc installation? Yy/Nn (Default=N)
y [输入]
添加环境变量
$ echo "source /usr/local/greenplum-cc-6.5.0/gpcc_path.sh" >> ~/.bash_profile
$ source ~/.bash_profile
启动GPCC:
# 允许gpmon登录数据库
$ echo "host all gpmon 0.0.0.0/0 md5" >> /data/master/gpseg-1/pg_hba.conf
# 重载配置
$ gpstop -u
# 测试使用gpmon能否登录数据库
psql -Ugpmon -h 127.0.0.1 postgres
# 免密登录
echo "localhost:5432:*:gpmon:gpmon" >> ~/.pgpass
chmod 600 ~/.pgpass
# 启动
$ gpcc start -W
Password for GPDB user gpmon:
2021-07-21 14:43:43 Starting the gpcc agents and webserver...
2021-07-21 14:43:43 Please verify if metrics_collector extension available <nil>
2021-07-21 14:43:43 Unable to export alert conf to gpcc-alert.yml: open /data/master/gpseg-1/gpmetrics/gpcc-alert.yaml: no such file or directory
2021-07-21 14:43:44 Unable to start metrics collection agent on this gpdb cluster
2021-07-21 14:43:44 Failed to start agent, please refer /usr/local/greenplum-cc-6.5.0/logs for details
浏览器登录GPCC的web界面
地址:http://
用户名和密码:gpmon/gpmon