原 GreenPlum官方监控工具GPCC的安装和卸载
Tags: 原创GreenPlum安装部署gpcc数据库监控官方监控工具
简介
Greenplum 数据库提供基于 Web 的可视化工具—Greenplum Command Center(简称GPCC)。GPCC 可以监控 Greenplum 数据库系统的性能、集群健康状态、查询执行及系统资源使用情况。GPCC 监控系统性能指标,分析集群健康状况,并使数据库管理员能够在 Greenplum Database 环境中执行管理任务。它提供了一个本地浏览器的 HTML5 图形控制台,用于查看 Greenplum Database 系统指标和执行某些数据库管理任务。
文档
https://docs.vmware.com/en/VMware-Tanzu-Greenplum-Command-Center/index.html
下载地址
https://network.pivotal.io/products/gpdb-command-center
安装gpcc
只在master库上安装即可,客户端agent会自动安装到其它segment和standby master上。
root用户在所有节点做准备工作(必须)
GreenPlum在运行过程中,修改软件的权限为gpadmin.gpadmin并不会引起GPDB的宕机,可以放心修改。
修改所有节点的gpdb的目录权限为gpadmin,否则后续安装gpcc会报错(例如:IOError、gpadmin-[CRITICAL]:-gppkg failed. (Reason='')、Permission denied等):
1 2 | chown -R gpadmin.gpadmin /usr/local/greenplum-db-6.25.1 chown -R gpadmin.gpadmin /usr/local/greenplum-db |
在所有节点创建gpcc安装目录:
1 2 3 4 5 6 7 8 9 10 | rm -rf /usr/local/greenplum-cc mkdir -p /usr/local/greenplum-cc-6.9.1 ln -sf /usr/local/greenplum-cc-6.9.1 /usr/local/greenplum-cc chown -R gpadmin:gpadmin /usr/local/greenplum-cc-6.9.1 -- 或者 source /usr/local/greenplum-db/greenplum_path.sh gpssh -f /home/gpadmin/conf/all_hosts 'sudo mkdir -p /usr/local/greenplum-cc-6.9.1; sudo chown -R gpadmin:gpadmin /usr/local/greenplum-cc-6.9.1' gpssh -f /home/gpadmin/conf/all_hosts 'sudo ln -s /usr/local/greenplum-cc-6.9.1 /usr/local/greenplum-cc' |
配置结果:
1 2 3 4 5 | [root@mdw1 local]# ll lrwxrwxrwx 1 gpadmin gpadmin 29 Jan 12 11:13 greenplum-cc -> /usr/local/greenplum-cc-6.9.1 drwxr-xr-x 12 gpadmin gpadmin 4096 Jan 12 13:40 greenplum-cc-6.9.1 lrwxrwxrwx 1 gpadmin gpadmin 30 Dec 26 18:48 greenplum-db -> /usr/local/greenplum-db-6.25.1 drwxr-xr-x 12 gpadmin gpadmin 4096 Dec 6 12:27 greenplum-db-6.25.1 |
开始安装
交互式安装
1 2 3 4 5 | su - gpadmin source /usr/local/greenplum-db/greenplum_path.sh unzip greenplum-cc-web-6.9.1-gp6-rhel7-x86_64.zip cd greenplum-cc-web-6.9.1-gp6-rhel7-x86_64/ ./gpccinstall-6.9.1 -W |
安装过程:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | [gpadmin@mdw1 greenplum-cc-web-6.9.1-gp6-rhel7-x86_64]$ ./gpccinstall-6.9.1 -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.9.1 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/TLS? 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 INSTALLATION IN PROGRESS... ******************************************************************************** * * * INSTALLATION IS ALMOST COMPLETED * * * * The last step is to update the metrics_collector extension, which needs to * * restart the Greenplum Database cluster. Please proceed to $GPCC_HOME and * * follow the instructions in this file: * * * * update-extension.txt * * * * Some new features may not be available before the update is done. * * * * To use GPCC with the old metrics_collector extension, source gpcc_path.sh * * and run 'gpcc start'. * * * ******************************************************************************** |
静默安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | su - gpadmin source /usr/local/greenplum-db/greenplum_path.sh unzip greenplum-cc-web-6.9.1-gp6-rhel7-x86_64.zip cd greenplum-cc-web-6.9.1-gp6-rhel7-x86_64/ cat > /tmp/gpcc_install.conf <<"EOF" path = /usr/local master_port = 5432 web_port = 28080 rpc_port = 8899 enable_ssl = false enable_kerberos = false language = 2 EOF cat > /tmp/gpcc_install.conf <<"EOF" path = /usr/local # Set the display_name param to the string to display in the GPCC UI. # The default is "gpcc" # display_name = gpcc master_port = 5432 web_port = 28080 rpc_port = 8899 enable_ssl = false # Uncomment and set the ssl_cert_file if you set enable_ssl to true. # ssl_cert_file = /etc/certs/mycert enable_kerberos = false # Uncomment and set the following parameters if you set enable_kerberos to true. # webserver_url = <webserver_service_url> # krb_mode = 1 # keytab = <path_to_keytab> # krb_service_name = postgres # User interface language: 1=English, 2=Chinese, 3=Korean, 4=Russian, 5=Japanese language = 2 EOF ./gpccinstall-6.9.1 -c /tmp/gpcc_install.conf |
升级extension metrics_collector(必须)
1 2 3 4 5 6 7 | -- 环境变量加入master和standby master节点 echo 'source /usr/local/greenplum-cc/gpcc_path.sh' >> ~/.bashrc source /usr/local/greenplum-cc/gpcc_path.sh cd $GPCC_HOME cat update-extension.txt |