博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
OpenStack collectd的从零安装客户端
阅读量:6081 次
发布时间:2019-06-20

本文共 5333 字,大约阅读时间需要 17 分钟。

1.查看是否需要增加yum 源

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[root@node-12 ~]
# yum search collectd
Loaded plugins: fastestmirror
Determining fastest mirrors
 
* base: mirrors.skyshe.cn
 
* extras: mirrors.skyshe.cn
 
* updates: mirrors.btte.net
base                                                                                                                                                                               | 3.7 kB     00:00    
extras                                                                                                                                                                             | 3.4 kB     00:00    
nailgun                                                                                                                                                                            | 1.3 kB     00:00    
updates                                                                                                                                                                            | 3.4 kB     00:00    
updates
/primary_db                                                                                                                                                                
| 888 kB     00:00    
Warning: No matches found
for
: collectd
No Matches found
[root@node-12 ~]
#

发现没有我们需要的collectd软件包。需要增加软件源epel.

1
2
3
4
5
[root@node-12 ~]
# rpm -Uvh
Retrieving http:
//mirrors
.hustunique.com
/epel//6/x86_64/epel-release-6-8
.noarch.rpm
warning:
/var/tmp/rpm-tmp
.IHCvEN: Header V3 RSA
/SHA256
Signature, key ID 0608b895: NOKEY
Preparing...               
########################################### [100%]
   
1:epel-release          
########################################### [100%]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[root@node-12 ~]
# yum search collectd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel
/metalink                                                                                                                                                                     
| 5.7 kB     00:00    
 
* base: mirrors.skyshe.cn
 
* epel: mirrors.ustc.edu.cn
 
* extras: mirrors.skyshe.cn
 
* updates: mirrors.btte.net
epel                                                                                                                                                                               | 4.1 kB     00:00    
epel
/primary_db                                                                                                                                                                   
| 6.4 MB     00:06    
========================================================================================= N
/S
Matched: collectd ==========================================================================================
collectd-apache.x86_64 : Apache plugin
for
collectd
collectd-dns.x86_64 : DNS traffic analysis module
for
collectd
collectd-email.x86_64 : Email plugin
for
collectd
collectd-ipmi.x86_64 : IPMI module
for
collectd
collectd-mysql.x86_64 : MySQL module
for
collectd
collectd-nginx.x86_64 : Nginx plugin
for
collectd
collectd-nut.x86_64 : Network UPS Tools module
for
collectd
collectd-
ping
.x86_64 :
ping
module
for
collectd
collectd-postgresql.x86_64 : PostgreSQL module
for
collectd
collectd-rrdtool.x86_64 : RRDTool module
for
collectd
collectd-sensors.x86_64 : Libsensors module
for
collectd
collectd-snmp.x86_64 : SNMP module
for
collectd
collectd-virt.x86_64 : Libvirt plugin
for
collectd
fedmsg-collectd.noarch : A fedmsg plugin
for
collectd
perl-Collectd.x86_64 : Perl bindings
for
collectd
collectd.i686 : Statistics collection daemon
for
filling RRD files
collectd.x86_64 : Statistics collection daemon
for
filling RRD files
collectd-web.x86_64 : Contrib web interface to viewing rrd files
python-bucky.noarch : CollectD and StatsD adapter
for
Graphite
 
  
Name and summary matches only, use
"search all"
for
everything.
[root@node-12 ~]
#

可以知道已经有了我们需要的软件包。

安装collectd软件包

1
yum
install
collectd collect-*

这里可能会有下面的错误:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--> Finished Dependency Resolution
Error: Package: collectd-web-4.10.9-1.el6.x86_64 (epel)
           
Requires: perl-HTML-Parser
Error: Package: collectd-web-4.10.9-1.el6.x86_64 (epel)
           
Requires: perl(HTML::Entities)
Error: Package: collectd-rrdtool-4.10.9-1.el6.x86_64 (epel)
           
Requires: rrdtool
Error: Package: collectd-ipmi-4.10.9-1.el6.x86_64 (epel)
           
Requires: libOpenIPMIutils.so.0()(64bit)
Error: Package: perl-Collectd-4.10.9-1.el6.x86_64 (epel)
           
Requires: perl(RRDs)
Error: Package: collectd-email-4.10.9-1.el6.x86_64 (epel)
           
Requires: spamassassin
Error: Package: collectd-snmp-4.10.9-1.el6.x86_64 (epel)
           
Requires: net-snmp
Error: Package: collectd-ipmi-4.10.9-1.el6.x86_64 (epel)
           
Requires: libOpenIPMIpthread.so.0()(64bit)
Error: Package: collectd-web-4.10.9-1.el6.x86_64 (epel)
           
Requires: perl(URI::Escape)
Error: Package: collectd-ipmi-4.10.9-1.el6.x86_64 (epel)
           
Requires: libOpenIPMI.so.0()(64bit)
Error: Package: collectd-web-4.10.9-1.el6.x86_64 (epel)
           
Requires: perl(RRDs)
Error: Package: collectd-web-4.10.9-1.el6.x86_64 (epel)
           
Requires: rrdtool-perl
Error: Package: collectd-web-4.10.9-1.el6.x86_64 (epel)
           
Requires: perl(JSON)
Error: Package: collectd-rrdtool-4.10.9-1.el6.x86_64 (epel)
           
Requires: librrd_th.so.4()(64bit)
Error: Package: perl-Collectd-4.10.9-1.el6.x86_64 (epel)
           
Requires: perl(URI::Escape)
 
You could try using --skip-broken to work around the problem
 
You could try running: rpm -Va --nofiles --nodigest

表示缺少这方面的包,如果没有该错误,请跳过下面的解决办法。

1
Requires: perl(URI::Escape)

表示perl程序没有URI::Escape包。 将其他标准版本的Centos的镜像里的/etc/yum.repo.d/Centos-Base.repo到这台新的计算节点。因为新的计算节点是使用的fuel-web的源,并且国内的163.sohu等源都不好用。 重新执行安装collectd-*程序正常。

验证collectd可用

编辑/etc/collectd.conf配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#Hostname    "localhost"
FQDNLookup  
true
#BaseDir     "/usr/var/lib/collectd"
#PIDFile     "/usr/var/run/collectd.pid"
#PluginDir   "/usr/lib/collectd"
#TypesDB     "/usr/share/collectd/types.db"
#Interval     10
#Timeout      2
#ReadThreads  5
 
LoadPlugin syslog
LoadPlugin cpu
LoadPlugin disk
LoadPlugin interface
LoadPlugin load
LoadPlugin memory
LoadPlugin libvirt
LoadPlugin network
<Plugin libvirt>
        
Connection
"qemu:///system"
        
RefreshInterval 60
        
#Domain "name"
  
#BlockDevice "name:device"
  
#InterfaceDevice "name:interface"
  
#IgnoreSelected false
  
HostnameFormat
"name"
<
/Plugin
>
<Plugin disk>
#       Disk "/^[hs]d[a-f][0-9]?$/"
#       IgnoreSelected false
<
/Plugin
>
 
#Include "/etc/collectd.d"
 
<Plugin network>
        
Server
"172.17.46.3"
"25826"
#       CacheTimeout 120
#       CacheFlush   900
<
/Plugin
>

启动服务

1
service collectd start

刷新:

转载于:https://www.cnblogs.com/CLTANG/p/4332635.html

你可能感兴趣的文章
Qt多线程
查看>>
我的友情链接
查看>>
想说一点东西。。。。
查看>>
css知多少(8)——float上篇
查看>>
NLB网路负载均衡管理器详解
查看>>
水平添加滚动条
查看>>
PHP中”单例模式“实例讲解
查看>>
VS2008查看dll导出函数
查看>>
VM EBS R12迁移,启动APTier . AutoConfig错误
查看>>
atitit.细节决定成败的适合情形与缺点
查看>>
Mysql利用binlog恢复数据
查看>>
我的友情链接
查看>>
用yum安装mariadb
查看>>
一点IT"边缘化"的人的思考
查看>>
WPF 降低.net framework到4.0
查看>>
搭建一个通用的脚手架
查看>>
开年巨制!千人千面回放技术让你“看到”Flutter用户侧问题
查看>>
开源磁盘加密软件VeraCrypt教程
查看>>
本地vs云:大数据厮杀的最终幸存者会是谁?
查看>>
阿里云公共镜像、自定义镜像、共享镜像和镜像市场的区别 ...
查看>>