cacti结合nagios

使用系统ubuntu12.0.45

监控软件,cacti 使用的是源码安装系统自带的版本过低需要添加插件

nagios采用的系统自带版本

安装nagios

apt-get install nagios3

中间出现的密码最好都填写一致以免出错

 

apt-get install ndoutils

 

最后输入mysql的root密码

 

 

  1. 编辑ndoutils

 

vim /etc/default/ndoutils

ENABLE_NDOUTILS=1

Vim  /etc/nagios3/ndo2db.cfg

socket_type=tcp

socket_name=/var/cache/nagios3/ndo.sock

db_port=3306

db_name=cacti

db_prefix=npc_

db_user=cacti

db_pass=cacti

debug_level=1

debug_file=/var/cache/nagios3/ndo2db.debug

vim /etc/nagios3/nagios.cfg

check_external_commands=1

  在251行添加如下内容

broker_module=/usr/lib/ndoutils/ndomod-mysql-3x.o config_file=/etc/nagios3/ndomod.cfg

process_performance_data=1

vim /etc/nagios3/ndomod.cfg

output_type=tcpsocket

ouput=127.0.0.1

buffer_file=/var/cache/nagios3/ndomod.tmp

 启动服务

service nagios3 restart

/etc/init.d/ndoutils restart

/etc/init.d/mysql restart

service apache2 restart

  1. 添加模块配置文件

 

 

 

配置nagios完成

提醒读者,此文章有一处有问题,也是笔者自己部署的时候跳进别人的坑,大家自己找找。很容易的。

有问题可以留言,基本上一直使用这个博客

 

posted @ 2016-09-06 14:13  浪涛天涯  阅读(220)  评论(0编辑  收藏  举报