collectd部署(二)

9 篇文章 0 订阅
4 篇文章 0 订阅
两台ubuntu虚拟机,一台为server,一台client。server IP:192.168.91.130,拟接收数据端口25827.
server安装,版本为4.10
apt-get install collectd 

/etc/collectd/collectd.conf配置(主要加入network plugin和rrdtool plugin):
LoadPlugin syslog
<Plugin syslog>
LogLevel info
</Plugin>

LoadPlugin cpu
LoadPlugin df
LoadPlugin disk
LoadPlugin interface
LoadPlugin load
LoadPlugin memory
LoadPlugin network
LoadPlugin rrdtool

<Plugin network>
# # client setup:
# Server "ff18::efc0:4a42" "25826"
# <Server "239.192.74.66" "25826">
# SecurityLevel Encrypt
# Username "user"
# Password "secret"
# Interface "eth0"
# </Server>
# TimeToLive "128"
#
# server setup:
Listen "192.168.91.130" "25827"
#<Listen "192.168.91.130" "25827">
# SecurityLevel Sign
# AuthFile "/etc/collectd/passwd"
# Interface "eth0"
#</Listen>
# MaxPacketSize 1024
#
# # proxy setup (client and server as above):
# Forward true
#
# # statistics about the network plugin itself
# ReportStats false
#
# # "garbage collection"
# CacheFlush 1800
</Plugin>

<Plugin rrdtool>
DataDir "/var/lib/collectd/rrd"

# CacheTimeout 120
# CacheFlush 900
# WritesPerSecond 30
# RandomTimeout 0
#
# The following settings are rather advanced
# and should usually not be touched:
# StepSize 10
# HeartBeat 20
# RRARows 1200
# RRATimespan 158112000
# XFF 0.1
</Plugin>

配置好保存启动:/etc/init.d/collectd start


client端配置:
安装:apt-get install collectd
同样在/etc/collectd/collectd.conf下配置:
不同的是在network插件里,配置
# client setup:
Server "192.168.91.130" "25827"
#<Server "192.168.91.130" "25827">
# SecurityLevel Encrypt
# Username "user"
# Password "secret"
# Interface "eth0"
#</Server>
配置好后重启,/etc/init.d/collectd start

在server端,用rrdtool查看数据。比如查看今天14:00——15:00的平均值,观察得知,collectd每700s产生一个新数据。


目前不大明白shortterm等代表的含义。
第二次配置时犯了个小错误,plugin network在默认是被#屏蔽掉,当时配置好了network但是一直没有起作用,就是忘记消除屏蔽了。消除后一切正常。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值