安装Greenplum-perfmon-web监控软件

安装Greenplum-perfmon-web监控软件
(1) 安装前准备
OS:
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

软件包:
greenplum-perfmon-web-4.1.1.3-build-4-RHEL5-x86_64.zip

安装节点:
GP Master节点

(2) 执行Greenplum DB数据库的gpperfmon_install工具,完成前期的准备工作。
功能大致是:
    创建greenplum监控用数据库(gpperfmon)
    创建greenplum监控用数据库角色(gpmon)
    配置greenplum数据库接受来自perfmon监控的链接文件(pg_hba.conf和.pgpass)
    设置postgresql.conf文件,增加启用监控的参数。(这些参数默认会添加在文件的末尾)
    设置pg_hba.conf文件,增加如下信息:  
    local    gpperfmon         gpmon         md5
    host     all               gpmon         127.0.0.1/28    md5
1) 使用gpadmin用户登录
#su – gpadmin
2) 执行 gpperfmon_install 命令
gpadmin@linux116:~> gpperfmon_install --enable --password huawei123 --port 5432
20140512:14:21:37:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/lib/gpperfmon/gpperfmon3.sql template1 >& /dev/null
20140512:14:22:07:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/lib/gpperfmon/gpperfmon4.sql gpperfmon >& /dev/null
20140512:14:22:08:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/lib/gpperfmon/gpperfmon41.sql gpperfmon >& /dev/null
20140512:14:22:12:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/lib/gpperfmon/gpperfmon42.sql gpperfmon >& /dev/null
20140512:14:22:16:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/lib/gpperfmon/gpperfmonC.sql template1 >& /dev/null
20140512:14:22:16:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-PGPORT=5432 psql template1 -c "DROP ROLE IF EXISTS gpmon"  >& /dev/null
20140512:14:22:16:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-PGPORT=5432 psql template1 -c "CREATE ROLE gpmon WITH SUPERUSER CREATEDB LOGIN ENCRYPTED PASSWORD 'huawei123'"  >& /dev/null
20140512:14:22:17:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-echo "local    gpperfmon         gpmon         md5" >> /data/master/gpseg-1/pg_hba.conf
20140512:14:22:17:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-echo "host     all         gpmon         127.0.0.1/28    md5" >> /data/master/gpseg-1/pg_hba.conf
20140512:14:22:17:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-touch /home/gpadmin/.pgpass >& /dev/null
20140512:14:22:17:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-mv -f /home/gpadmin/.pgpass /home/gpadmin/.pgpass.1399875697 >& /dev/null
20140512:14:22:17:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-echo "*:5432:gpperfmon:gpmon:huawei123" >> /home/gpadmin/.pgpass
20140512:14:22:17:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-cat /home/gpadmin/.pgpass.1399875697 >> /home/gpadmin/.pgpass
20140512:14:22:17:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-chmod 0600 /home/gpadmin/.pgpass >& /dev/null
20140512:14:22:17:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-PGPORT=5432 gpconfig -c gp_enable_gpperfmon -v on >& /dev/null
20140512:14:22:23:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-PGPORT=5432 gpconfig -c gpperfmon_port -v 8888 >& /dev/null
20140512:14:22:29:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-PGPORT=5432 gpconfig -c gp_external_enable_exec -v on --masteronly >& /dev/null
20140512:14:22:35:020002 gpperfmon_install:linux116:gpadmin-[INFO]:-gpperfmon will be enabled after a full restart of GPDB


3) 重启greenplum
gpadmin@linux116:~> gpstop –r
4) 查看gpmon进程,是否已经启用
gpadmin@linux116:~> ps -ef  | grep gpmon


(3) 安装greenplum-perfmon-web-4.1.1.3-build-4-RHEL5-x86_64.zip

1)下载适合自己机器的greenplum-perfmon-web安装程序
greenplum-perfmon-web-4.1.1.3-build-4-RHEL5-x86_64.zip

2) 解压并执行greenplum-perfmon-web的执行文件
#unzip greenplum-perfmon-web-4.1.1.3-build-4-RHEL5-x86_64.zip
#greenplum-perfmon-web-4.1.1.3-build-4-RHEL5-x86_64.bin

3) 修改文件的属组
# chown -R gpadmin:gpadmin /usr/local/greenplum-perfmon-web-4.1.1.3-build-4
4,加载环境配置文件
#source /usr/local/greenplum-perfmon-web-4.1.1.3-build-4/gpperfmon_path.sh


5) 用gpadmin用户登录
# su – gpadmin

6) 启动安装命令
$ gpperfmon –-setup
填写相关信息,web端口28080,可以启用SSL


7) 启动perfmon
$ gpperfmon --start
访问https://IP:28080
输入用户名和密码登录就OK了(gpmon/huawei123)






你可能感兴趣的:(安装Greenplum-perfmon-web监控软件)