您好,登錄后才能下訂單哦!
本篇內容介紹了“nagios插件ndoutile的使用方法”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!
cmake安裝
./bootstrap ; make ; make install
mysql安裝
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DMYSQL_DATADIR=/data/mysqldb \
-DMYSQL_TCP_PORT=3306 \
-DENABLE_DOWNLOADS=1
make && make install
chown mysql:mysql /usr/local/mysql/ -R
chown mysql:mysql /data/mysqldb/ -R
scripts/mysql_install_db --user=mysql --datadir=/data/mysqldb
service mysqld start
啟動報錯
The server quit without updating PID file ([FAILED]sqldb/nagios.pid)
解決辦法,查看日志。pid進程是否存在。、
wget http://www.cpan.org/modules/by-module/DBD/DBI-1.634.tar.gz
wget http://www.cpan.org/modules/by-module/DBD/DBD-mysql-4.033.tar.gz
cd DBI-1.605
perl Makefile.PL
make
make install
cd DBD-mysql-3.0008
unset LANG
perl Makefile.PL --libs="-L/usr/local/mysql/bin/mysql -lmysqlclient -L/usr/lib -lz" --cflags=-I/usr/local/mysql/include/mysql --mysql_config=/usr/local/mysql/bin/mysql_config --testhost=127.0.0.1 --
testsocket=/usr/local/mysql/tmp/mysql.sock --testdb=nagios --testuser=root --testpassword=123456 :有問題 沒繼續(xù)
make
make install
cd /usr/local/include
# ln -s /usr/local/mysql/include/mysql ./mysql
# cd /usr/lib64
# ln -s /usr/local/mysql/lib/mysql/libmysqlclient.so ./libmysqlclient.so
# ln -s /usr/local/mysql/lib/mysql/libmysqlclient.so.16\
./configure --prefix=/usr/local/nagios --enable-mysql --disable-pgsql LDFLAGS=-L/usr/local/mysql/lib --with-mysql-inc=/usr/local/mysql/include/mysql --with-mysql-lib=/usr/local/mysql/lib/mysql
make
cp ./src/ndomod-3x.o /usr/local/nagios/bin
cp ./src/ndo2db-3x /usr/local/nagios/bin
cp ./src/log2ndo /usr/local/nagios/bin
cp ./src/file2sock /usr/local/nagios/bin
chown nagios:nagios /usr/local/nagios/bin/*
# cp ./config/ndo* /usr/local/nagios/etc/
# chown nagios:nagios /usr/local/nagios/etc/*
mysql -uroot -p
mysql> create database ndodb;
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON nagios.* TO nagios@localhost IDENTIFIED BY '123456';
mysql> flush privileges;
mysql> \q
生成ndoutils所需要的數據庫
cd db
./installdb -u n root -p 123456 -h localhost -d ndodb
也可這樣:# /opt/mysql/bin/mysql -u root -p -D nagios -h localhost < ./db/mysql.sql
vi /usr/local/nagios/etc/ndo2db.cfg
db_user=nagios
db_pass=123456
vi /usr/local/nagios/etc/nagios.cfg
broker_module=/usr/local/nagios/bin/ndomod-3x.o config_file=/usr/local/nagios/etc/ndomod.cfg
event_broker_options=-1
/usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg
“nagios插件ndoutile的使用方法”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關的知識可以關注億速云網站,小編將為大家輸出更多高質量的實用文章!
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。