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

来源:互联网 发布:淘宝书店转让 编辑:程序博客网 时间:2024/06/09 21:01

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 .bashrcsource /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
0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 联通全国流量包怎么办 缤智车钥匙丢了怎么办 车遮阳板松了怎么办 洗车把内饰划了怎么办 新车销售没销量怎么办 住院时间重叠了怎么办 长安cs75油耗高怎么办 墙内线烧了怎么办 如果没买票想进高铁站怎么办 老赖拒绝还款怎么办 gta5资产不兼容怎么办 平板黑屏闪退怎么办 施工证学历不够怎么办 隧道放炮声大怎么办 58工作被骗了怎么办 学历国家不承认怎么办 福州居住证一年到期怎么办 居住证过期2年怎么办 被房东坑了怎么办 房东违反了合同怎么办 上海居住证过期了怎么办 地铁卡消磁了怎么办 学生卡消磁了怎么办 家属院没房产证怎么办 邮箱收不到邮件怎么办 大学宿舍八人间怎么办 高中档案袋拆了怎么办 公派教师回国后怎么办? 事业单位辞职后档案怎么办 学信支付不了怎么办 校外怎么办北邮校园卡 报考身份证丢了怎么办 买房怎么办不取消低保 自考找不到真题怎么办 自考生考研没有档案怎么办 自考本科无学位怎么办 自考学位证书没拿到怎么办 自考毕业证出生日期错误怎么办 成考没有学位证怎么办 评职称学历认证怎么办 国家不承认学历怎么办