nagios与cacti的整合
上篇:nagios安装 http://chengchow.blog.运维网.com/blog/1642666/9709739、nagios与cacti的整合
9.1 ndoutils安装
tar -zxvf ndoutils-1.4b9.tar.gz
cd ndoutils-1.4b9
./configure –prefix=/var/www/localhost/htdocs/nagios
--with-mysql-inc=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql --enable-mysql --with-ndo2db-user=nagios --with-ndo2db-group=nagios
Make不需要make install
cd src/
cp ndomod-3x.o ndo2db-3x log2ndo file2sock /var/www/localhost/htdocs/nagios/bin
cd ../config
cp ndo2db.cfg-sample /var/www/localhost/htdocs/nagios/etc/ndo2db.cfg
cp ndomod.cfg-sample /var/www/localhost/htdocs/nagios/etc/ndomod.cfg
cd /var/www/localhost/htdocs/nagios/etc
vi ndo2db.cfg
socket_name=/var/www/localhost/htdocs/nagios/var/ndo.sock
db_name=cactidb
db_prefix=npc_
db_user=cactiuser
db_pass=cactipass
debug_level=1
debug_file=/var/www/localhost/htdocs /nagios/var/ndo2db.debug
vi ndomod.cfg
output=/var/www/localhost/htdocs/nagios/var/ndo.sock
buffer_file=/var/www/localhost/htdocs/nagios/var/ndomod.tmp
9.2 开启ndo2db服务
Cd /var/www/localhost/htdocs/nagios/
Bin/nagios –d etc/nagios.cfg
Bin/ndo2db –c etc/ndo2db.cfg
9.3 NPC的安装
Tar zxvf npc-2.0.4.tar.gz –C /var/www/localhost/htdocs/cacti/plugins/
登录cacti管理界面
点击”Console”->”plugin Management”->安装并打开NPC界面,如下图
http://blog.运维网.com/attachment/201305/155107890.png
9.4 NPC配置
点击”console”->”settings”->”NPC”,配置nagios访问路径和nagiosNaNd路径
http://blog.运维网.com/attachment/201305/155140331.png
9.5 修改几个错误的按钮
Vi /var/www/htdoc/localhost/cacti/plugins/npc/ top_graph_header.php
第95行修改红色部分
页:
[1]