標籤:
使用系統ubuntu12.0.45
監視軟體,cacti 使用的是源碼安裝系統內建的版本過低需要添加外掛程式(我不會)so
nagios採用的系統內建版本
安裝nagios
apt-get install nagios3
中間出現的密碼最好都填寫一致以免出錯
apt-get install ndoutils
最後輸入mysql的root密碼
- 編輯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
- 添加模組設定檔
配置nagios完成
提醒讀者,此文章有一處有問題,也是筆者自己部署的時候跳進別人的坑,大家自己找找。很容易的。
有問題可以留言,基本上一直使用這個部落格
cacti結合nagios