GreenPlum安装性能监控工具GPCCC(Greenplum Command Center Console)

Greenplum安装完毕,将原有数据迁移过去,可以进行查询了,接下来就是GP的使用了,除了基本的语法外,我们比较关注的是性能监控和性能优化了,后面的两篇就是针对这两个方面的操作。(以下操作均在master节点操作,除非特别说明)

1.performance monitor安装
使用gpperfmon_install命令,Greenplum安装完成后已经包含该命令,安装后会建立名为gpperfmon的数据库,默认使用gpmon用户。

[gpadmin@mdw ~]$ gpperfmon_install --enable --password gpmon --port 5432

然后重启数据库,-r的含义是restart

gpstop -r 

2.确认监控采集进程是否已经启动

ps -ef|grep gpmmon|grep -v grep
#确认Performance Monitor数据库写入数据是否正常,检查是否有记录写入
 psql -d gpperfmon -c 'select * from system_now'

如果配置了master的standby,拷贝Master主机拷贝配置文件到Standby Master的相应目录.

[gpadmin@mdw ~]$ gpscp -h smdw /data/master/gpseg-1/pg_hba.conf =:$MASTER_DATA_DIRECTORY/
[gpadmin@mdw ~]$ gpscp -h smdw ~/.pgpass =:~/

3.安装Greenplum Command Center Console
这个工具是一个web端的监控界面,已经改名叫GPCCC了,开始安装的时候怎么也找不到下载的地址,原来在这里https://network.pivotal.io/products/pivotal-gpdb
这里写图片描述

3.1安装gpccc,注意是root用户

[root@gp1 ~]# ./greenplum-cc-web-1.3.0.0-build-91-RHEL5-x86_64.bin
  输入performance monitor的安装目录如 /home/greenplum-4.3-cc
  chown -R gpadmin:gpadmin greenplum-4.3-cc/
  chown -R gpadmin:gpadmin greenplum-cc-web

gpccc和gpdb一样,都会创建一个软链接,分别是greenplum-db和greenplum-cc-web.

3.2设置环境变量

[root@mdw ~]#source /home/greenplum-4.3-cc/gpcc_path.sh
  或者vi ~/.bashrc
     source /home/greenplum-4.3/greenplum_path.sh
     source /home/greenplum-4.3-cc/gpcc_path.sh
  source ~/.bashrc

3.3 在所有主机安装GPCCC
这里的all_host文件就采用前面安装GPDB的时候的所有节点的文件

gpccinstall -f /home/gpadmin/all_hosts 
 #但是发现greenplum-cc-web属主是root,修改为gpadmin
 gpssh -f /home/gpadmin/all_hosts 'chown -R gpadmin:gpadmin /home/greenplum-cc-web'

#注意在所有机器上配置环境变量,或者使用gpscp 将一台机器的文件copy到其他机器
vi .bashrc
source /home/greenplum-4.3-cc/gpcc_path.sh

3.4 配置安装详细项

gpcmdr --setup
   Please enter a new instance name:输入gpcc
   Is the master host for the Greenplum Database remote? Yy|Nn (default=N):n
   What would you like to use for the display name for this instance:gpcc
   What port does the Greenplum Database use? (default=5432):回车
   will you install workload manaager (default=N):Y
   What port would you like the web server to use for this instance?回车
   Do you want to enable SSL for the Web API Yy|Nn (default=N):n
   Do you want to copy the instance to a standby master host Yy|Nn (default=Y): 没有standby n
   What is the hostname of the standby master host? [mdw]:回车 

3.5 启动及相关操作

   启动实例:
   gpcmdr --start gpcc

   查看端口状态: lsof -i :28080 
     发现是lighttpd

   浏览:http://mdw:28080/

这里写图片描述
这里写图片描述

4.相关注意事项
4.1重启应用的时候,如果有其他链接,可以强制重启:gpstop -M immediate

4.2 错误error
1.no pg_hba.conf entry for host “::1”, user “gpmon”, database “gpperfmon”, SSL off
解决:

vi pg_hba.conf增加:
     host    gpperfmon   gpmon           ::1/128    trust (此处的trust应该为md5,否则后面会报错)

2.error: 在安装workload manaager报错,按提示查看日志,发现一台机器crontab 没安装
解决:

yum install vixie-cron

3.登陆web提示:trust login is disabled.trust user gpmon is not allowed to login Command Center
描述:
psql -d gpperfmon -U gpmon -W 输入密码可以正常登陆
查看日志:/home/greenplum-4.3-cc/instances/gpcc2/logs/gpmonws.log
我們從日志“Trust login not allowed. User gpmon has trust login enabled”可以看出,
gpmon是不容許Trust方式登錄的,因爲GP監控實例配置文件gpperfmonui.conf中默認配置allow_trust_logon=False,
指不容許Trust方式登錄。
修改pg_hba.conf将其中的trust修改为md5

  host     all         gpmon         127.0.0.1/28    md5
  host    gpperfmon       gpmon   ::1/128         md5
  host    gpperfmon       gpmon   192.168.151.0/24        md5
  这里gpmon用户是不允许trust链接的,但是针对gpadminIII的使用,对于151段的配置还是可以使用trust,不冲突
  host     all         all             192.168.151.0/24   trust
  • 8
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值