GreenPlum运维监控工具-gpcc-web安装

Greenplum Command Center(GPCC)是由Pivotal Software推出的一款监控和管理Greenplum Database的Web应用程序。它提供了一个易于使用的界面,可以帮助管理员监控集群的性能、诊断问题、管理用户和权限、设置预警和警报,并执行其他管理任务。

GPCC具有以下主要功能:

监控集群性能:GPCC提供了关于Greenplum集群中各个组件的性能指标的详细信息,包括查询性能、磁盘和内存使用情况、系统负载、网络流量等。管理员可以利用这些指标来监测集群的健康状况,并快速发现和解决性能问题。

诊断问题:GPCC提供了一系列工具,可以帮助管理员诊断Greenplum集群中的问题。例如,管理员可以使用查询监视器来跟踪正在运行的查询,以了解查询的执行情况、性能瓶颈和潜在问题。GPCC还提供了一个系统监视器,可以帮助管理员诊断系统级别的问题,例如磁盘空间不足、节点故障等。

管理用户和权限:GPCC允许管理员管理Greenplum集群上的用户和权限。管理员可以添加或删除用户、分配或收回权限,并跟踪用户的活动。

设置预警和警报:GPCC允许管理员设置预警和警报,以便在发生异常情况时及时得到通知。例如,管理员可以设置一个警报,当集群中的磁盘空间使用超过某个阈值时,就会发送警报通知。

执行其他管理任务:GPCC还提供了其他管理任务,例如备份和恢复数据、管理数据库对象、扩展集群等。

GPCC是一个非常有用的工具,可以帮助管理员监控和管理Greenplum集群,提高集群的性能和可靠性。

Greenplum与gpcc版本匹配

安装前先确定Greenplum版本,再去下载匹配的gpcc版本

--查看gp版本
SELECT version();
--PostgreSQL 9.4.26 (Greenplum Database 6.19.1 build commit:0e314744a460630073b46cea7b7cf20a81e3da63) on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 6.4.0, 64-bit compiled on Jan 18 2022 13:41:23

可以看到Greenplum Database 6.19.1我的版本是 6.19.1,安装gpcc需要与greenplum版本对应,可以找到官网查看版本对应

https://network.pivotal.io/products/gpdb-command-center#/releases/1243596

注意版本对应

对应上图中1是gpcc版本,标注为2的方框是支持的greenplum版本,下载gpcc时一定要能够支持我们的greenplum版本,否则版本不对应安装完成后会出现以下情况。

 

 上图显示版本不对应,大家避雷,一定注意版本对应情况,否则白忙活。

开始安装

确定gpcc版本后下载,对应的安装包,本案例以greenplum-cc-web-6.8.4为例。

官网下载完成后上传到指定目录,本案例目录:

[gpadmin@gsgp60 software]# pwd
/home/gpadmin/software
[gpadmin@gsgp60 software]# ls | grep 6.8.4
greenplum-cc-web-6.8.4-gp6-ubuntu18.04-x86_64.zip

解压

[gpadmin@gsgp60 software]# unzip greenplum-cc-web-6.8.4-gp6-ubuntu18.04-x86_64.zip

 解压完成进入目录,执行安装

[gpadmin@gsgp60 software]# cd greenplum-cc-web-6.8.4-gp6-ubuntu18.04-x86_64
[gpadmin@gsgp60 greenplum-cc-web-6.8.4-gp6-ubuntu18.04-x86_64]# ls
gpccinstall-6.8.4
#注意先执行以下的命令否则报错
[gpadmin@gsgp60 greenplum-cc-web-6.8.4-gp6-ubuntu18.04-x86_64]$ source /usr/local/greenplum-db/greenplum_path.sh
#开始安装
[gpadmin@gsgp60 greenplum-cc-web-6.8.4-gp6-ubuntu18.04-x86_64]# ./gpccinstall-6.8.4
#开始安装

以下是安装过程记录:

[gpadmin@gsgp60 greenplum-cc-web-6.8.4-gp6-ubuntu18.04-x86_64]$ ./gpccinstall-6.8.4
Where would you like to install Greenplum Command Center? (Default=/usr/local)
/home/gpadmin/software
Greenplum Command Center will be installed in /home/gpadmin/software/greenplum-cc-6.8.4

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

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'.                                                        *
*                                                                              *
********************************************************************************

安装完成,添加环境变量:

[gpadmin@gsgp60 greenplum-cc-6.8.4]$ echo "source /home/gpadmin/software/greenplum-cc-6.8.4/gpcc_path.sh" >> ~/.bashrc
[gpadmin@gsgp60 greenplum-cc-6.8.4]$ source  ~/.bashrc

注意上面的的路径一定是我们安装的路径,不要配置错误。

添加完环境变量,进入目录启动gpcc-web

[gpadmin@gsgp60 greenplum-cc]$ cd /home/gpadmin/software/greenplum-cc
[gpadmin@gsgp60 greenplum-cc]$ gpcc start
2023-05-17 18:00:49 Starting the gpcc agents and webserver...
2023-05-17 18:00:49 Migration gpmetrics folder from $MASTER_DATA_DIRECTORY to $HOME done
2023-05-17 18:00:53 Agent successfully started on 3/3 hosts
2023-05-17 18:00:53 View Greenplum Command Center at http://gsgp60:28080

启动成功,打开浏览器登录gpcc。修改密码请看文章结尾。

 进入界面查看监控信息

 由于gpmon监控系统信息,权限较大,为了安全建议修改密码。

以下为修改密码过程

#进入文件修改
[gpadmin@gsgp60 greenplum-cc]$ vi ~/.pgpass
[gpadmin@gsgp60 greenplum-cc]$ cat ~/.pgpass
*:5432:gpperfmon:gpmon:changeme
把changeme修改为最新密码

#修改数据库中密码
[gpadmin@gsgp60 greenplum-cc]$ psql postgres
psql (9.4.26)
Type "help" for help.

postgres=# alter role gpmon with password '新的密码';
ALTER ROLE

密码修改完成。gpcc-web安装完成。

猜你喜欢

转载自blog.csdn.net/wangning0714/article/details/130718486