Cacti+Nagios完全攻略(三)spine及最新补丁的安装

简介:

 

由于cmd.php不能满足项目需求,用spine替换掉

1.下载Cacti-spine最新版本,(要同使用的cacti版本相匹配)

 
 
2.由于安装spine,测试中发现,执行—with-snmp= /usr/include/net-snmp/报“error: Cannot find UCD-SNMP libraries(snmp)”这个错误,最后只能卸载之前用yum安装的net-snmp
 
a.卸载net-snmp
[root@cacti soft]#yum list |grep net-snmp
[root@cacti soft]#yum remove net-snmp
 
b.安装net-snmp源包
[root@cacti soft]#tar zxvf net-snmp-5.4.3.tar.gz
[root@cacti soft]#cd net-snmp-5.4.3
[root@cacti net-snmp-5.4.3]#./configure --prefix=/usr/local/net-snmp
[root@cacti net-snmp-5.4.3]#make ;make install
[root@cacti net-snmp-5.4.3]#cp EXAMPLE.conf /usr/local/net-snmp/share/snmp/snmpd.conf
[root@cacti net-snmp-5.4.3]#ln -s /usr/local/net-snmp/bin/* /usr/local/bin/
[root@cactinet-snmp-5.4.3]#/usr/local/net-snmp/sbin/snmpd -c /usr/local/net-snmp/share/snmp/snmpd.conf
[root@cactinet-snmp-5.4.3]#echo“/usr/local/net-snmp/sbin/snmpd /usr/local/net-snmp/share/snmp/snmpd.conf ”>>/etc/rc.local
 
3.安装spine
[root@cacti soft]#wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.7g.tar.gz
[root@cacti soft]#tar zxvf cacti-spine-0.8.7g.tar.gz
[root@cacti soft]#cd cacti-spine-0.8.7g
[root@cacticacti-spine-0.8.7g]#./configure --prefix=/usr/local/cacti-spine --with-snmp=/usr/local/net-snmp
[root@cacti cacti-spine-0.8.7g]#make && make install
[root@cacti cacti-spine-0.8.7g]#cd /usr/local/cacti-spine/etc/
[root@cacti etc]#cp spine.conf.dist spine.conf
[root@cacti etc]#vi spine.conf
[root@cacti etc]#service httpd restarat
[root@cacti etc]#crontab -e(设置轮询刷新时间)

接着在cacti页面上面设置poller选择spine,如下图设置
 

这样就结束了.
 
 
4.由于这段时间发现cacti出问题,用snmkwalk能抓到数据,但图出不来,如下情况
 
 
后来查看了cacti日子信息后发现提示以下错误:
 

经过谷歌搜索,发现最近spine有bug,需要安装最新补丁.
 
+Patched 0.8.7g
+-bug#0001669: Problems with getting data from script using SPINE on Windows Server 2003 x32 
+-bug#0001829: Wrong string numerical value got from Spine SNMP poller 
+-bug: Net-snmp API issues cause spine crashes with some SNMP agents
+-bug: Host list not properly initialized
+-bug: Mutex locking issues cause deadlocks in Windows
+-bug: Escape windows type back slashes in scripts
 
下载最新补丁:
 
下载好的补丁放在cacti-spine-0.8.7g目录下面
然后需重新执行安装步骤
[root@cacticacti-spine-0.8.7g]#./configure --prefix=/usr/local/cacti-spine --with-snmp=/usr/local/net-snmp
[root@cacticacti-spine-0.8.7g]#  patch -p1 -N < unified_issues.patch
[root@cacti cacti-spine-0.8.7g]#make && make install
[root@cacti cacti-spine-0.8.7g]#cd /usr/local/cacti-spine/etc/
[root@cacti etc]#cp spine.conf.dist spine.conf
[root@cacti etc]##vi spine.conf (覆盖后重新修改连接数据库的账号密码)

[root@cacti etc]#service httpd restarat
 
 重新查看cacti日志:

  再mark一下(2011.03.23)
 
报以下错误
03/23/2011 11:57:01 AM - PHPSVR: Poller[0] ERROR: Input Expected, Script Server Terminating
03/23/2011 11:57:01 AM - PHPSVR: Poller[0] ERROR: Input Expected, Script Server Terminating
03/23/2011 11:57:01 AM - PHPSVR: Poller[0] ERROR: Input Expected, Script Server Terminating
03/23/2011 11:57:01 AM - SPINE: Poller[0] FATAL: Connection Failed, Error:'1040', Message:'Too many connections' (Spine thread)

解决方法:

vim /etc/my.cnf

增加set-variable = max_connections=500

/etc/init.d/mysqld restart

 

再mark一下(2011.04.27)
 
最近发现cacti监控表每隔10分钟抓不到数据,很奇怪,也不知道哪位同事修改了 Console -> Cacti Settings -poller-Poller Interval为30秒,后来改回一分钟一切恢复正常
 

因为在系统本身是设置一分钟,觉得有冲突
[root@cacti ~]# crontab -e
*/1 * * * * env LANG=C /usr/bin/php /var/www/html/poller.php > /dev/null 2>&1

问题图如下:





    本文转自viong 51CTO博客,原文链接:http://blog.51cto.com/viong/477235,如需转载请自行联系原作者



 

 

相关文章
|
10月前
|
人工智能 语音技术
首个可保留情感的音频LLM!Meta重磅开源7B-Spirit LM,一网打尽音频+文本多模态任务
Meta AI 研究团队提出了一种名为 SpiRit-LM 的新型多模态语言模型,该模型能够处理文本和音频,实现两者无缝融合。SpiRit-LM 通过“交织”方法训练,具备多模态融合、情感保留和多任务学习能力,在自动语音识别、文本转语音等任务上表现出色。它有 Base 和 Expressive 两个版本,后者能更好地捕捉情感表达。研究团队在多个基准上测试了其性能,并探索了其在语音助手、内容创作、教育和音频编辑等领域的应用前景。
319 1
|
人工智能 自然语言处理 监控
PMP认证有哪些要求:干货分享
本文详细介绍PMP的报考要求、考试内容与形式、认证有效期及价值,以及备考策略和推荐的学习工具,帮助考生高效准备。
607 2
|
安全 数据中心
数据中心服务器机架是什么
数据中心服务器机架是用于容纳服务器、存储器等IT设备的结构,旨在提升数据中心的管理与运营效率。常见的类型包括开放式机架、封闭式机柜和壁挂式机架,每种类型各有特点,适用于不同的场景需求。选择时需考虑尺寸、承重、冷却效率及安全性等因素,以确保最佳的使用效果。
1081 4
物联网卡不能更换地区使用吗
物联网卡(IoT SIM卡)是否能更换地区使用,主要取决于几个关键因素,包括物联网服务提供商的政策、物联网卡的类型(如预付费、后付费)、网络覆盖范围、以及是否存在地理限制等。以下是一些常见的考虑点和操作步骤:
|
人工智能 大数据 区块链
|
C语言 定位技术 存储
【C语言基础入门】二级指针、一维数组与指针、二维数组与指针
【C语言基础入门】二级指针、一维数组与指针、二维数组与指针
464 0
【C语言基础入门】二级指针、一维数组与指针、二维数组与指针
|
存储 弹性计算 固态存储
阿里云服务器4核32G配置多少钱?我们应该如何选择?
阿里云服务器4核32G配置有多达十几种实例规格可选,不同实例规格的收费标准不一样,本文介绍了4核32G配置可选实例规格和最新收费标准及活动价格,可供大家了解阿里云服务器4核32G配置多少钱以及选择建议。
阿里云服务器4核32G配置多少钱?我们应该如何选择?
|
监控 关系型数据库 MySQL
zabbix 简单介绍 及部署
zabbix 简单介绍 及部署
|
Python
【已解决】ModuleNotFoundError: No module named ‘DBUtils‘,from DBUtils.PooledDB import PooledDB,
【已解决】ModuleNotFoundError: No module named ‘DBUtils‘,from DBUtils.PooledDB import PooledDB,
1325 0
|
NoSQL Cloud Native 关系型数据库
阿里云数据库有哪些?主要用于哪些使用场景?
阿里云数据库有哪些?主要用于哪些使用场景?
909 0