Chinaunix首页 | 论坛 | 博客
  • 博客访问: 358045
  • 博文数量: 49
  • 博客积分: 2709
  • 博客等级: 少校
  • 技术积分: 890
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-01 16:19
文章分类

全部博文(49)

文章存档

2013年(1)

2012年(5)

2011年(5)

2010年(5)

2009年(6)

2008年(27)

我的朋友

分类: 数据库开发技术

2010-08-07 15:52:44

 
安装greenplum的监控
 
 
一)前期准备
 
1)创建gpmon角色
create role gpmon with superuser createdb login encrypted password 'gpmon';
2)编辑master节点的pg_hba.conf文件。
8月6日配置的pg_hba.conf文件
 
local    all         gpadmin         ident
host     all         gpadmin         127.0.0.1/32    trust
host     all         gpadmin         10.25.115.16/32       trust
host     all         gpadmin         10.25.115.8/32       trust
 

host      gpperfmon     gpmon          127.0.0.1/24    md5
local     gpperfmon     gpmon          md5
 
 
贴出segment的pg_hba.conf文件

# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
host    all         all         ::1/128               trust
host all all 10.25.115.16/32 trust
host all all 10.25.115.14/32 trust
host all all 10.25.115.17/32 trust
host all all 10.25.115.8/32 trust
host all all 192.168.122.1/32 trust
3)重新加载配置文件
gpstop -u
4)设置监控postgresql.conf参数
添加如下内容
 
#--------------------------------
# GPPERFMON OPTIONS
#--------------------------------
gp_enable_gpperfmon=on
gpperfmon_port=8888
 
 
去掉已有参数的注释
#gp_external_enable_exec = on
的#
gp_external_enable_exec = on
5)重新加载配置文件,让其生效
gpstop -u
 
二)开始安装
 
1)在master安装
2)在segment安装
3)配置Greenplum Performance Monitor Database
 
1)在master安装
    • 解压
    • 执行            ./greenplum-perfmon-2.0.0.3-RHEL5-x86_64.bin
    • 修改目录权限    chown -R gpadmin /usr/local/greenplum-perfmon-2.0.0.3
    • 加载            source /usr/local/greenplum-perfmon-2.0.0.3/gpperfmon_path.sh
    • 将/usr/local/greenplum-perfmon-2.0.0.3/gpperfmon_path.sh 内容保持到 /etc/profile
2)在segment安装
    • 在主节点压缩包          tar -cvf /usr/local/perfmon.tar /usr/local/greenplum-perfmon-2.0.0.3
    • 将压缩包传输到各节点    gpscp  -f /home/gpadmin/seg_hosts  /usr/local/perfmon.tar =:/usr/local/
    • 登陆各节点              gpssh -f /home/gpadmin/seg_hosts
    • 解压
    • 设置权限                chown -R gpadmin /usr/local/greenplum-perfmon-2.0.0.3
                              chgrp -R gpadmin /usr/local/greenplum-perfmon-2.0.0.3
3)配置Greenplum Performance Monitor Database
    • 设置目录参数              chown -R gpadmin:gpadmin /dbfast1/gp-1//gpperfmon
    • PGPASSWORD='password1234' PGPORT='6432' gpperfmon --setup       我没有使用ssl,端口我改为8888
The quantum value specifies the time in seconds between updates from
performance monitor agents on all segments.
Quantum (between 10 and 60 seconds). [15]:
 
The minimum query run time specifies the cutoff time for queries to log.
Only queries with a run time greater than this value will be logged in
the queries_history table.
Minimum query run time (seconds) [60]:
 
The minimum detailed query run time specifies the cutoff time for queries
to log detailed iterator metrics.  Only queries with a run time greater
than this value will have their detailed metrics logged in the
iterators_history table.
Minimum detailed query run time (seconds) [60]:
 
Log file location [/home/gpadmin/gpmaster/gp-1/gpperfmon/logs]:
------------------------
Web Server Configuration
------------------------
 
gpperfmon runs a small web server for the UI and web API.  This web
server by default runs on port 28080, but you may specify any available port.
Web server port [28080]:8888
 
Do you want to enable SSL for the Web API (Y/N) [Y]:n
 
Done writing lighttpd configuration to /home/gpadmin/gpmaster/gp-1/gpperfmon/conf/lighttpd.conf
Done writing gpperfmon configuration to /home/gpadmin/gpmaster/gp-1/gpperfmon/conf/gpperfmon.conf
 
Greenplum Performance Monitor configuration is now complete.  If
at a later date you want to change certain parameters, you can
either re-run 'gpperfmon --setup' or edit the configuration file
located at /home/gpadmin/gpmaster/gp-1/gpperfmon/conf/gpperfmon.conf.
 
You can start monitoring this Greenplum Database instance by running
'gpperfmon --start'.
The web based UI is available at
    • PGPASSWORD='password1234' PGPORT='6432' gpperfmon --restart     非5432 标准端口,需要加port参数的  以gpmon用户执行         需要 /dbfast1 目录有对gpmon用户有权限
4)使用浏览器登录
登录使用的用户名为:
gpmon
密码是:
PGPASSWORD='password1234' PGPORT='6432' gpperfmon --setup 的初始化的密码
登录界面;
 
 
 
 
登陆后的界面:
 
系统汇总信息
 
 
 
系统统计信息
 
 
 
查询监控
 
阅读(2099) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~