91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

The Nagios Monitoring數據如何寫進Mysql中

發布時間:2020-06-02 11:22:49 來源:網絡 閱讀:207 作者:三月 欄目:移動開發

下文主要給大家帶來The Nagios Monitoring數據如何寫進Mysql中,希望這些內容能夠帶給大家實際用處,這也是我編輯The Nagios Monitoring數據如何寫進Mysql中這篇文章的主要目的。好了,廢話不多說,大家直接看下文吧。

-------------------------------CMAKE-------------------------------

Install the compiler tool:

#tar xzf cmake-2.8.10.2.tar.gz 
#cd cmake-2.8.10.2
#./bootstrap
#make
#make install
-------------------------------Mysql-------------------------------
Preparatory work:
#groupadd mysql
#useradd -r -g mysql mysql
#mkdir /etc/mysql
#chown mysql:mysql /etc/mysql
 
Compile & Install:
#tar xzf mysql-5.6.10.tar.gz
#cd mysql-5.6.10
#cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/var/mysql/data \
-DSYSCONFDIR=/etc/mysql \
-DEXTRA_CHARSETS=all \
-DENABLED_LOCAL_INFILE=1
#make
#make install
 
Database initialization:
#chown -R mysql:mysql /usr/local/mysql
#mkdir -p /var/mysql/data
#chown -R mysql:mysql /var/mysql
#cd /usr/local/mysql/scripts
#./mysql_install_db --user=mysql \
--basedir=/usr/local/mysql \
--datadir=/var/mysql/data \
--skip-name-resolve
#mv ../support-files/my-default.cnf /etc/mysql/my.cnf
#mv ../support-files/mysql.server /etc/rc.d/init.d/mysqld
#service mysqld start
 
Change Password & verify that the installation was successful:
#/usr/local/mysql/bin/mysqladmin -u root password 'mysql'
#/usr/local/mysql/bin/mysql -uroot -pmysql
>status
 
-------------------------------Ndoutils-------------------------------
The ndoutils installation:
#tar xzf ndoutils-1.5.2.tar.gz
#cd ndoutils-1.5.2
#./configure --prefix=/usr/local/nagios \
--with-mysql=/usr/local/mysql \
--sysconfdir=/etc/nagios \
--with-ndo2db-user=nagios \
--with-ndo2db-group=nagios \
--enable-mysql
 
Modify the installation configuration file, otherwise it will make an error:
#vi include/config.h
#Original configuration is as follows:
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
#Modified as follows
#include </usr/local/mysql/include/mysql.h>
#include </usr/local/mysql/include/errmsg.h>
 
Installation:
#make
  
Copy the compiled daemon to your Nagios installation:
#cp src/ndomod-3x.o /usr/local/nagios/bin/
#cp src/ndo2db-3x /usr/local/nagios/bin/ndo2db
#chown nagios:nagios /usr/local/nagios/bin/ndo*
 
Copy the default configuration file to the configuration directory that you specify:
#cp config/ndo2db.cfg-sample /etc/nagios/ndo2db.cfg
#cp config/ndomod.cfg-sample /etc/nagios/ndomod.cfg
#chown nagios:nagios /etc/nagios/ndo*
 
Increase to start the service:
#cp daemon-init /etc/init.d/ndo2db
#chmod u+x /etc/init.d/ndo2db
 
Create a database:
#export PATH=$PATH:/usr/local/mysql/bin/
#mysql -uroot -pmysql
>create database nagios;
>quit
 
Creating a database structure:
#cd db
#mysql -uroot -p nagios<./mysql.sql
 
Modify the Nagios configuration file:
#vim /etc/nagios/nagios.cfg
#Add by Kingcraft
broker_module=/usr/local/nagios/bin/ndomod-3x.o config_file=/etc/nagios/ndomod.cfg
 
Empowering for the database user nagios:
#mysql -u root -pmysql
>grant all privileges on nagios.* to 'nagios'@'127.0.0.1' identified by 'nagios';
>quit
 
Modify the Ndoutils configuration file:
#vim /etc/nagios/ndo2db.cfg
db_user=nagios
db_pass=nagios
db_host=127.0.0.1
 
#vim /etc/nagios/ndomod.cfg
output=127.0.0.1
 
Create soft links, or can not start:
#ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64
 
Verify whether the nagios data can be written to the database:
#service ndo2db start
#service nagios restart
 
#mysql -u root -pmysql
>use nagios
>select host_id,display_name,address from nagios_hosts;
+---------+-----------------+-----------------+
| host_id | display_name    | address         |
+---------+-----------------+-----------------+
|       1 | Linuxhost       | 192.168.174.130 |
|       2 | linksys-srw224p | 192.168.60.16   |
+---------+-----------------+-----------------+
對于以上關于The Nagios Monitoring數據如何寫進Mysql中,大家是不是覺得非常有幫助。如果需要了解更多內容,請繼續關注我們的行業資訊,相信你會喜歡上這些內容的。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

辽阳县| 札达县| 吉林市| 登封市| 和龙市| 南郑县| 新绛县| 临泽县| 泸西县| 奎屯市| 大名县| 鸡东县| 岫岩| 元阳县| 东至县| 溧水县| 杭锦后旗| 林芝县| 瑞昌市| 英吉沙县| 长寿区| 顺昌县| 景泰县| 台北县| 远安县| 开阳县| 城步| 闽清县| 晴隆县| 淳化县| 扎鲁特旗| 鹤岗市| 临邑县| 三门县| 普安县| 佛冈县| 云南省| 景德镇市| 古蔺县| 霍邱县| 盖州市|