nagios 外掛程式ndoutils 安裝配置

來源:互聯網
上載者:User

標籤:

nagios 外掛程式ndoutils 安裝配置

 原文地址:http://www.cnblogs.com/caoguo/p/5022645.html

 

 

# Nagios install ndoutils# 安裝ndoutils外掛程式[[email protected] ~]# yum install -y mysql-devel perl-DBD-MySQL[[email protected] ~]# wget http://nchc.dl.sourceforge.net/project/nagios/ndoutils-2.x/ndoutils-2.0.0/ndoutils-2.0.0.tar.gz[[email protected] src]# tar zxf ndoutils-2.0.0.tar.gz [[email protected] src]# cd ndoutils-2.0.0[[email protected] ndoutils-2.0.0]# ./configure --prefix=/usr/local/nagios --with-ndo2db-user=nagios --with-ndo2db-group=nagcmd[[email protected] ndoutils-2.0.0]# make && make install[[email protected] ndoutils-2.0.0]# cp daemon-init /etc/init.d/ndo2db[[email protected] ndoutils-2.0.0]# chmod 755 /etc/init.d/ndo2db[[email protected] ndoutils-2.0.0]# cp config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg[[email protected] ndoutils-2.0.0]# cp config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg[[email protected] ndoutils-2.0.0]# chown nagios.nagcmd /usr/local/nagios/etc/ndo*[[email protected] ndoutils-2.0.0]# chmod 664 /usr/local/nagios/etc/ndo*# 建立資料庫及資料帳戶[[email protected] ~]# mysql -uroot -pEnter password: mysql> create database nagios;mysql> create user [email protected] identified by ‘nagios‘;mysql> grant all on nagios.* to [email protected];mysql> flush privileges;mysql> quit# 匯入表結構[[email protected] ndoutils-2.0.0]# cd db/[[email protected] db]# ./installdb -u nagios -p nagios -h localhost -d nagios# ndo2db配置資料連線[[email protected] ~]# cd /etc/nagios/[[email protected] nagios]# vi ndo2db.cfgndo2db_user=nagiosndo2db_group=nagcmddb_name=nagiosdb_user=nagiosdb_pass=nagios[[email protected] ~]# /etc/init.d/ndo2db start# nagios與ndoutils通訊[[email protected] nagios]# vi nagios.cfgbroker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg[[email protected] ~]# /etc/init.d/nagios restart

 

#重啟nagios,nagios日誌輸出應該如下

 

#查看下資料庫

 

 

 

資料存入資料時ok的,結束!!!

nagios 外掛程式ndoutils 安裝配置

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.