温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

nagios插件ndoutile的使用方法

发布时间:2021-08-06 11:47:45 来源:亿速云 阅读:165 作者:chen 栏目:移动开发

本篇内容介绍了“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    :有问题 没继续
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的使用方法”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI