安装NDOutils


官方的一些簡介:
NDOUtils allows you to export current and historical data from one or more Nagios instances to a MySQL database. Several community addons use this as one of their data sources. NDOUtils consists of a standalone daemon, a Nagios event broker, and several helper utilities
Centreon gets all its status and performace data directly from the database. To get the data into the DB, ndoutils are used as an additional layer between nagios and centreon . NDOutils consist of 2 parts: ndomod and ndo2db - the first one is the sender , the second the receiver . As you can read in DistributedArchitecture and see in the image, each nagios instance sends data through the ndomod module to the ndo2db daemon, which writes the data into the database. To enable such a setup some manual configuration steps are needed .
NDOutils 軟件主要是用於將數據存數據庫,然後又可讀取出來,它在nagios 與centerton 之間接收和發送數據。
NODutils  有三個版本,一個是官方的,一個是修改的SVN 版本,另外一個是有補丁用於官方的版本。

the patch for official version

You will find the latest version on the official Nagios website http://www.nagios.org: download the archive

# cd /usr/local/src
# wget http://prdownloads.sourceforge.net/sourceforge/nagios/ndoutils-1.4b9.tar.gz

Unpack the archive and change the directory:

# tar -xzf ndoutils-1.4b9.tar.gz
# cd ndoutils-1.4b9

You will find the lastest patch on the svn server of Centreon project :

# wget http://svn.centreon.com/trunk/ndoutils-patch/ndoutils1.4b9_light.patch
# patch -p1 -N < ndoutils1.4b9_light.patch
# less README

configuration and installation
# ./configure --prefix=/usr/local/nagios/ --enable-mysql --disable-pgsql \
   --with-ndo2db-user=nagios --with-ndo2db-group=nagios
# make

manual installation (no make install :-()
After creating the binaries and libraries they have to be copied

 cp ./src/ndomod-3x.o /usr/local/nagios/bin/ndomod.o
 cp ./src/ndo2db-3x /usr/local/nagios/bin/ndo2db
 cp ./config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
 cp ./config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
 sudo chmod 774 /usr/local/nagios/bin/ndo*
 sudo chown nagios:nagios /usr/local/nagios/bin/ndo*

make ndo2db daemon autorun
Install the ndo init script by copying it from the ndoutils to the init directory and making it executable by running

# cp ./daemon-init /etc/init.d/ndo2db
# chmod +x /etc/init.d/ndo2db

Then add it to your init runlevel to load it automatically when starting/restarting your server. For Debian/Ubuntu do as root or with sudo:

# update-rc.d ndo2db defaults

for CentOs and family:
# chkconfig --add ndo2db

留言

這個網誌中的熱門文章

Json概述以及python對json的相關操作

遠程控制管理工具ipmitool

從Kubernetes到Cloud Native——雲原生應用之路