你好,游客 登录 注册 搜索
背景:
阅读新闻

Graphite和collectd 建立监控服务器 PDF

[日期:2013-04-17] 来源:Linux社区  作者:Linux [字体:大 中 小]

Graphite 只是一个数据绘图工具,安装完成之后还需要喂数据给它,具体的数据采集工作是由第三方工具完成,具体的工具可以参考 Graphite协作工具 。本文使用 collectd 来收集服务器的性能指标,然后发送这些数据到 Graphite,再将图形绘制出来。

一、Graphite准备
 
1、安装依赖包
 
[root@~]#rpm -Uvh http://dl.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
 
 
 
[root@collectd ~]# yum install -y bitmap bitmap-fonts-compat Django django-tagging fontconfig cairo python-devel python-memcached python-twisted  pycairo mod_python python-ldap python-simplejson memcached python-zope-interface mod_wsgi python-sqlite2 git gcc gcc-c++ make
 
 
 
2、安装Graphite组件
 
Graphite组件:whisper、carbon、graphite-web
 
安装方式:源代码、pip、virtualenv(本例使用源码安装)
 
 
 
下载文件
 
[root@]# wget https://launchpad.net/graphite/0.9/0.9.10/+download/graphite-web-0.9.10.tar.gz
 
[root@]# wget https://launchpad.net/graphite/0.9/0.9.10/+download/carbon-0.9.10.tar.gz
 
[root@]# wget https://launchpad.net/graphite/0.9/0.9.10/+download/whisper-0.9.10.tar.gz
 
 
 
安装方法(默认安装位置/opt/graphite目录)
 
whisper、carbon、graphite-web安装方法相同,解压软件,进入软件目录,执行以下命令
 
[root@collectd soft]# tar zxvf carbon-0.9.10.tar.gz
 
[root@collectd soft]# cd carbon-0.9.10
 
[root@collectd carbon-0.9.10]# python setup.py install
 
 
 
[root@collectd soft]# tar zxvf graphite-web-0.9.10.tar.gz
 
[root@collectd soft]# cd graphite-web-0.9.10
 
[root@collectd graphite-web-0.9.10]# python setup.py install
 
 
 
[root@collectd soft]# tar zxvf whisper-0.9.10.tar.gz
 
[root@collectd soft]# cd whisper-0.9.10
 
[root@collectd whisper-0.9.10]# python setup.py install
 
 
 
3、配置graphite
 
1)设置graphite配置文件
 
[root@collectd ~]# cd /opt/graphite/conf/
 
[root@collectd conf]# cp carbon.conf.example carbon.conf
 
[root@collectd conf]# cp storage-schemas.conf.example storage-schemas.conf
 
[root@collectd conf]# cp graphite.wsgi.example graphite.wsgi
 
其中:
 
        /opt/graphite/conf是配置文件存放目录
 
carbon.conf是carbon的配置文件,分三个片段cache、relay和aggregator
 
storage-schemas.conf配置文件定义数据的存储
 
graphite.wsgi配置文件配置django
 
2)设置apache虚拟主机
 
apache虚拟主机配置有一个样例在graphite-web安装包内的examples/example-graphite-vhost.conf,复制这个文件到apache配置文件

Graphite和collectd 建立监控服务器 PDF 下载:

免费下载地址在 http://linux.linuxidc.com/

用户名与密码都是www.linuxidc.com

具体下载目录在 /2013年资料/4月/17日/Graphite和collectd 建立监控服务器 PDF

linux
相关资讯       collectd  Graphite 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款