greenplum web页面监控安装

greenplum的一个web界面的监控系统。可以监控数据库的一些状态,节点信息。
主要应用greenplum-cc-web插件进行监控。
下载地址:https://network.pivotal.io/products/pivotal-gpdb#/releases/242342 的Greenplum Command Center目录下进行下载。
1、安装gpperfmon数据库,创建用户及密码

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

2、重启数据库

[gpadmin@mdw local]$ gpstop -M fast
[gpadmin@mdw local]$ gpstart -a

3、检查gp监控是否启动

[gpadmin@mdw local]$ ps -ef | grep gpmmon
gpadmin  29868 29859  0 11:34 ?        00:00:00 /home/greenplum/greenplum-db-5.14/bin/gpmmon -D /home/data/gpdata/master/gpseg-1/gpperfmon/conf/gpperfmon.conf -p 5432
gpadmin  30043 20141  0 11:36 pts/1    00:00:00 grep --color=auto gpmmon

4、检查gp监控是否检测到greenplum集群的每个节点

[gpadmin@mdw local]$ psql -d 'gpperfmon' -c 'select * from system_now;'
        ctime        | hostname |  mem_total  |  mem_used   | mem_actual_used | mem_actual_free | swap_total  | swap_used 
 | swap_page_in | swap_page_out | cpu_user | cpu_sys | cpu_idle | load0 | load1 | load2 | quantum | disk_ro_rate | disk_wo
_rate | disk_rb_rate | disk_wb_rate | net_rp_rate | net_wp_rate | net_rb_rate | net_wb_rate 
---------------------+----------+-------------+-------------+-----------------+-----------------+-------------+-----------
-+--------------+---------------+----------+---------+----------+-------+-------+-------+---------+--------------+--------
------+--------------+--------------+-------------+-------------+-------------+-------------
 2019-03-05 11:37:00 | sdw1     | 25100312576 | 21918515200 |      8192880640 |     16907431936 | 12683571200 | 1920409600
 |            0 |             0 |      0.1 |    0.03 |    99.86 |  0.02 |  0.03 |  0.05 |      15 |            0 |        
    1 |            0 |         3813 |         260 |          47 |       22762 |        7433
 2019-03-05 11:37:00 | sdw2     | 16645681152 | 14426570752 |      6582534144 |     10063147008 | 12683571200 | 2385162240
 |            0 |             0 |     0.03 |    0.03 |    99.93 |  0.04 |  0.04 |  0.05 |      15 |            0 |        
    1 |            0 |         3813 |         233 |          16 |       17450 |        1936
 2019-03-05 11:37:00 | mdw      | 25369853952 | 14667665408 |      1555886080 |     23813967872 | 12683571200 |    3223552
 |            0 |             0 |     0.02 |    0.02 |    99.96 |  0.03 |  0.03 |  0.05 |      15 |            0 |        
    1 |            0 |         1056 |         224 |           7 |       17250 |        1425
(3 rows)

5、创建数据目录和安装目录

[gpadmin@mdw ~]$ cat seg_host 
mdw
sdw1
sdw2
[gpadmin@mdw ~]$ gpssh -f seg_host 
=> cd /home/data
[sdw2]
[sdw1]
[ mdw]
=> sudo mkdir greenplum-cc-web
[sdw2]
[sdw1]
[ mdw]
=> sudo chown -R gpadmin:gpadmin greenplum-cc-web
[sdw2]
[sdw1]
[ mdw]
=> cd /usr/local
[ mdw]
[sdw2]
[sdw1]
=> sudo mkdir greenplum-cc-web-4.5.0
[ mdw]
[sdw2]
[sdw1]
=> sudo chown -R gpadmin:gpadmin greenplum-cc-web-4.5.0
[ mdw]
[sdw2]
[sdw1]
=> exit

6、解压安装

[gpadmin@mdw ~]# sudo chown -R gpadmin:gpadmin greenplum-cc-web-4.5.0-LINUX-x86_64.zip
[gpadmin@mdw ~]$ unzip greenplum-cc-web-4.5.0-LINUX-x86_64.zip 
Archive:  greenplum-cc-web-4.5.0-LINUX-x86_64.zip
   creating: greenplum-cc-web-4.5.0-LINUX-x86_64/
  inflating: greenplum-cc-web-4.5.0-LINUX-x86_64/gpccinstall-4.5.0
[gpadmin@mdw ~]$ cd greenplum-cc-web-4.5.0-LINUX-x86_64/
[gpadmin@mdw greenplum-cc-web-4.5.0-LINUX-x86_64]$ ls
gpccinstall-4.5.0
[gpadmin@mdw greenplum-cc-web-4.5.0-LINUX-x86_64]$ ./gpccinstall-4.5.0 
       ***  IMPORTANT INFORMATION - PLEASE READ CAREFULLY  ***
...
Rev: Pivotal_GPDB_EULA_03182014.txt
I HAVE READ AND AGREE TO THE TERMS OF THE ABOVE PIVOTAL GREENPLUM DATABASE
END USER LICENSE AGREEMENT.
Do you agree to the Pivotal Greenplum Command Center End User License Agreement? Yy/Nn (Default=Y)
  y

Where would you like to install Greenplum Command Center? (Default=/usr/local)


What would you like to name this installation of Greenplum Command Center? (Default=gpcc)


What port would you like gpcc webserver to use? (Default=28080)


Would you like to enable kerberos? Yy/Nn (Default=N)


Would you like enable SSL? Yy/Nn (Default=N)


Installation in progress...

Successfully installed Greenplum Command Center.

We recommend ssh to standby master before starting GPCC webserver

To start the GPCC webserver on the current host, run gpcc start

To manage Command Center, use the gpcc utility.

7、配置环境变量

[gpadmin@mdw ~]$ gpssh -f seg_host 
=> cd
[sdw2]
[sdw1]
[ mdw]
=> echo 'source /usr/local/greenplum-cc-web-4.5.0/gpcc_path.sh' >> ~/.bash_profile
[sdw2]
[sdw1]
[ mdw]
=> source ~/.bash_profile
[sdw2]
[sdw1]
[ mdw]
=> exit

8、启动

[gpadmin@mdw ~]$ gpcc start
Starting the gpcc agents and webserver…
2019/03/05 13:56:06 Agent successfully started on 3/3 hosts
2019/03/05 13:56:06 View Greenplum Command Center at http://mdw:28080

9、登录访问
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值