监控 | collectd | 代理 |验证 ---- ====== 准备环境 ====== yum install rrdtool 514 yum install rrdtool-devel.x86_64 515 yum install rrdtool 517 make ;make install 551 yum install libgcrypt-devel -y ====== 监控机器配置(机器可能有很多) ====== Hostname "192.168.16.140" FQDNLookup true WriteThreads 5 LoadPlugin logfile LogLevel info File "/opt/collectd/collectd.log" Timestamp true LoadPlugin cpu LoadPlugin interface LoadPlugin load LoadPlugin memory LoadPlugin network LoadPlugin rrdtool SecurityLevel "Sign" Username "fang" Password "123" Include "/etc/collectd.d" DataDir "/opt/collectd/rrd" ====== 中转代理机器配置(机器较少,减轻结果展示机器的负载) ====== Hostname "192.168.16.143" FQDNLookup true WriteThreads 5 LoadPlugin logfile LogLevel info File "/opt/collectd/collectd.log" Timestamp true LoadPlugin cpu LoadPlugin interface LoadPlugin load LoadPlugin memory LoadPlugin network LoadPlugin rrdtool #监听本机 SecurityLevel "Sign" AuthFile "/opt/collectd/auth_file" #[root@localhost ~]# cat /opt/collectd/auth_file #fang: 123 格式非常简单 账号: 密码 #所有请求发送到服务器 SecurityLevel "Sign" Username "fang" Password "123" Forward true #开启代理,别人发给我的数据我一律转发到192.168.16.142主机 Include "/etc/collectd.d" DataDir "/opt/collectd/rrd" #rrd文件的存放目录 ====== 结果展示机器(机器最少) ====== FQDNLookup true WriteThreads 5 LoadPlugin logfile LogLevel info File "/opt/collectd/collectd.log" Timestamp true LoadPlugin network LoadPlugin rrdtool SecurityLevel "Sign" AuthFile "/opt/collectd/auth_file" Include "/etc/collectd.d" DataDir "/opt/collectd/rrd"