collectd+graphite使用
来源:互联网 发布:mac好用的软件推荐 编辑:程序博客网 时间:2024/06/15 10:32
collectd和graphite是用来做什么的
- collectd: 是一个守护(daemon)进程,用来收集系统性能和提供各种存储方式来存储不同值的机制。比如基本的系统性能的收集(CPU、memory、process等)
- graphite:是一个企业级的监控工具,可以在廉价机硬件上运行;Graphite仅是一个画图工具,不主动地收集数据,而是将接收到的数据以图形的方式展现出来。
这里结合collectd和graphite,collectd用于收集数据,graphite以图表的形式显示数据。
collect安装
- 安装collectd-5.5.0.tar.gz,这个是目前最新版本,对java等支持非常好
- 在root@10.175.180.180这台机:
- 安装包在/tmp目录下,将其解压安装
- 安装完在/etc目录下有份collectd.conf配置文件,在其中配置需要的即可
- 启动命令:service collectd restart/start
install process:
Install prereqs
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++
Get Collectd, untar it, make it and install
wget http://collectd.org/files/collectd-5.5.0.tar.gz
tar zxvf collectd-5.5.0.tar.gz
cd collectd-5.5.0
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --mandir=/usr/share/man --enable-all-plugins
make
make install
Copy the default init.d script
cp /tmp/collectd-5.4.0/contrib/redhat/init.d-collectd /etc/init.d/collectd
Set the correct permissions
chmod +x /etc/init.d/collectd
Start the deamon
service collectd start
Note:If cannot tar the collectd-5.5.0.tar.gz
, you should upload it.
graphite安装
这里不介绍graphite的安装,本人没有安装graphite,在配置的Linux上已经安装好了graphite,就不误导大家了。推荐大家浏览:http://my.oschina.net/fufangchun/blog/232895?p=1,这里有详细的原理、安装等说明。
collectd.conf基本配置
########################################################################################################################################## Global ##----------------------------------------------------------------------------## Global settings for the daemon. ###############################################################################Hostname "localhost"#FQDNLookup true#BaseDir "/var/lib/collectd"#PIDFile "/var/run/collectd.pid"#PluginDir "/usr/lib/collectd"#TypesDB "/usr/share/collectd/types.db"
#----------------------------------------------------------------------------## Interval at which to query values. This may be overwritten on a per-plugin ## base by using the 'Interval' option of the LoadPlugin block: ## <LoadPlugin foo> ## Interval 60 ## </LoadPlugin> ##----------------------------------------------------------------------------#<LoadPlugin write_graphite> Interval 5</LoadPlugin>Interval 10Timeout 2ReadThreads 5WriteThreads 5
############################################################################### Logging ##----------------------------------------------------------------------------## Plugins which provide logging functions should be loaded first, so log ## messages generated when loading or configuring other plugins can be ## accessed. ###############################################################################LoadPlugin syslogLoadPlugin logfile<Plugin logfile>LogLevel infoFile STDOUTTimestamp truePrintSeverity false</Plugin><Plugin syslog>LogLevel info</Plugin>
############################################################################### LoadPlugin section ##----------------------------------------------------------------------------## Lines beginning with a single `#' belong to plugins which have been built ## but are disabled by default. ## ## Lines begnning with `##' belong to plugins which have not been built due ## to missing dependencies or because they have been deactivated explicitly. ###############################################################################LoadPlugin cpuLoadPlugin interfaceLoadPlugin memoryLoadPlugin processesLoadPlugin usersLoadPlugin diskLoadPlugin javaLoadPlugin write_graphite
############################################################################### Plugin configuration ##----------------------------------------------------------------------------## In this section configuration stubs for each plugin are provided. A desc- ## ription of those options is available in the collectd.conf(5) manual page. ###############################################################################<Plugin disk> Disk "/^[vhs]d[a-f][0-9]?$/" IgnoreSelected false</Plugin><Plugin interface> Interface "eth0" IgnoreSelected false</Plugin><Plugin write_graphite> <Node "graphing"> Host "localhost" Port "2003" Protocol "tcp" LogSendErrors true Prefix "collectd." StoreRates true AlwaysAppendDS false EscapeCharacter "_" </Node></Plugin>
graphite显示的结果
- collectd+graphite使用
- collectd使用
- Collectd
- 如何利用Graphite、StatsD与CollectD实现数据追踪与统计
- 如何在Ubuntu 14.04上配置Collectd为Graphite收集系统指标
- Graphite
- graphite
- graphite
- collectd监控应用cpu使用情况
- 使用 Collectd + InfluxDB + Grafana 监控主机
- 使用collectd监控更改采集间隔时间
- collectd的exec插件使用详细过程
- 使用graphite和cabot搭建监控服务
- 使用collectd与visage收集kvm虚拟机性能实时图形
- 使用 Grafana+collectd+InfluxDB 打造现代监控系统
- 使用 Grafana、collectd 和 InfluxDB 打造现代监控系统
- 使用 Grafana、collectd 和 InfluxDB 打造现代监控系统
- 使用 Grafana、collectd 和 InfluxDB 打造现代监控系统
- 汇编入门学习笔记(一)
- html中的横向广告滚动字幕
- 8 Tech Trends to Track in 2016
- 监控入门-vmstat命令
- 20160113,微软1月13日发布9个安全补丁
- collectd+graphite使用
- linux常用命令—— 文档编辑(四)
- 关于如何高效率开发一个 Android APP
- 2016-1-13 Struts2页面赋值遇到的问题 JQuery validate取消校验问题
- iOS7程序后台运行
- div+css的绝对定位
- sql输出执行计划范例
- Httpclient 发送XML
- 深入浅出解析大数据平台架构