温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ganglia的安装与配置步骤

发布时间:2021-09-09 15:08:32 来源:亿速云 阅读:113 作者:chen 栏目:云计算

这篇文章主要介绍“ganglia的安装与配置步骤”,在日常操作中,相信很多人在ganglia的安装与配置步骤问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”ganglia的安装与配置步骤”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

给ceph安装了一个ganglia监控,过程如下。

1. 环境说明

ceph是在centos6.5上安装的3台物理机:mon0, osd1, osd2,所以在这三台机器上都需要安装gmond;在osd2上安装gmetad。

2. 安装过程

先安装epel源:

rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

安装依赖包:

yum install apr-devel expat-devel

在mon0和osd1安装gmond:

yum install  ganglia ganglia-gmond httpd php apr apr-util

在osd2上安装gmetad:

yum install  ganglia ganglia-gmetad ganglia-gmond ganglia-web httpd php apr apr-util

3. 配置

配置web:

mkdir -p /var/www/html/ganglia/   //创建网站主目录下ganglia文件夹,用来访问ganglia
cp -a /usr/share/ganglia/* /var/www/html/ganglia/   //拷贝ganglia网站代码到该目录
chkconfig gmond on
chkconfig gmetad on
chkconfig httpd on

默认 /var/lib/ganglia/rrds的属主就是ganglia,不必像网上所说的改称nobody。

在/var/www/html/ganglia/下的conf.php有可能无效,需要手动拷贝一份:

cp  /usr/share/ganglia/conf.php /var/www/html/ganglia

在centos6.5上还有可能遇到web访问forbidden的情况,需要修改/etc/httpd/conf.d/ganglia.conf:

Alias /ganglia /usr/share/ganglia

  <Location /ganglia>
    Order deny,allow
    Deny from all
    Allow from all   //修改为all
    Allow from ::1
    # Allow from .example.com
  </Location>

配置/etc/ganglia/gmond.conf:

cluster {
  name = "ceph"   //cluster name
  owner = "unspecified"
  latlong = "unspecified"
  url = "unspecified"
}

/* The host section describes attributes of the host, like the location */
host {
  location = "unspecified"
}

/* Feel free to specify as many udp_send_channels as you like.  Gmond
   used to only support having a single channel */
udp_send_channel {
  host = 192.168.108.4   //gmetad ip
  port = 8649
}

/* You can specify as many udp_recv_channels as you like as well. */
udp_recv_channel {
  port = 8649
  bind = 192.168.108.3   //本机ip
  family = inet4
}

配置 /etc/ganglia/gmetad.conf,这里只需修改一行:

data_source "ceph" 192.168.108.4:8649 //gmetad ip

启动各种服务,然后在web输入gmetad_ip/ganglia就可以看到监控界面了。

以上是单播的配置,还有多播配置,可以自己查询。

到此,关于“ganglia的安装与配置步骤”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI