中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

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

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

cacti與nagios整合

發布時間:2020-06-18 15:56:50 來源:網絡 閱讀:447 作者:charlie_cen 欄目:移動開發
1.系統環境
# uname -a
Linux 10-6-8-200 2.6.32-279.22.1.el6.x86_64 #1 SMP Wed Feb 6 03:10:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release
CentOS release 6.3 (Final)
Nagios Stats 3.5.0
cacti-0.8.7e
2.下載包
ndoutils-1.4b9.tar.gz
npc-2.0.4.tar.gz
3.解壓編譯安裝
# tar zxf ndoutils-1.4b9.tar.gz
# cd ndoutils-1.4b9
# ./configure --prefix=/usr/local/nagios/ --sysconfdir=/usr/local/nagios/etc/ --enable-mysql --disable-pgsql
# make
# make install ##這步可以省略
4.拷貝命令
#cp src/{ndomd-3x.o,ndo2db-3x,file2sock,log2ndo} /usr/local/nagios/bin/
5.更改命令權限
# chown nagios.nagios /usr/local/nagios/bin/ndo*
# chmod 644 /usr/local/nagios/bin/ndo*
6.編輯配置文件
# vi /usr/local/nagios/etc/ndo2db.cfg
lock_file=/usr/local/nagios/var/ndo2db.lock
ndo2db_user=nagios
ndo2db_group=nagios
socket_type=tcp
socket_name=/usr/local/nagios/var/ndo.sock
tcp_port=5668
use_ssl=0
db_servertype=mysql
db_host=localhost
db_port=3306
db_name=cacti
db_prefix=npc_
db_user=cacti
db_pass=xxxx
max_timedevents_age=1440
max_systemcommands_age=10080
max_servicechecks_age=10080
max_hostchecks_age=10080
max_eventhandlers_age=44640
max_externalcommands_age=44640
debug_level=0
debug_verbosity=1
debug_file=/usr/local/nagios//var/ndo2db.debug
max_debug_file_size=1000000
# vi /usr/local/nagios/etc/ndomod.cfg
instance_name=default
output_type=tcpsocket
output=127.0.0.1
tcp_port=5668
use_ssl=0
output_buffer_items=5000
buffer_file=/usr/local/nagios//var/ndomod.tmp
file_rotation_interval=14400
file_rotation_timeout=60
reconnect_interval=15
reconnect_warning_interval=15
data_processing_options=-1
config_output_options=2
7.修改nagios的配置文件
# vi /usr/local/nagios/etc/nagios.cfg
event_broker_options=-1
broker_module=/usr/local/nagios/bin/ndomod-3x.o config_file=/usr/local/nagios/etc/ndomod.cfg
8.修改數據庫
# mysql -ucacti -p
mysql> use catci;
mysql> alter table npc_eventhandlers add long_output TEXT NOT NULL default '' after output;
mysql> alter table npc_hostchecks add long_output TEXT NOT NULL default '' after output;
mysql>  alter table npc_hoststatus add long_output TEXT NOT NULL default '' after output;
mysql> alter table npc_notifications add long_output TEXT NOT NULL default '' after output;
mysql> alter table npc_servicechecks add long_output TEXT NOT NULL default '' after output;
mysql> alter table npc_servicestatus add long_output TEXT NOT NULL default '' after output;
mysql> alter table npc_statehistory add long_output TEXT NOT NULL default '' after output;
mysql> alter table npc_systemcommands add long_output TEXT NOT NULL default '' after output;
9.拷貝服務啟動腳本
# cp daemon-init /etc/init.d/ndo2db
# chmod +x /etc/init.d/ndo2db
# chkconfig --add ndo2db
# chkconfig --level 35 ndo2db on
# service ndo2db start
# service nagios restart
10.解壓npc,并拷貝到cacti目錄
# tar zxf npc-2.0.4.tar.gz
# mv npc/ /var/www/html/cacti/plugin/

11.打開網頁進入cacti

console--->Configuration--->Plugin Management--->Npc

cacti與nagios整合

cacti與nagios整合


向AI問一下細節

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

AI

涞水县| 伊川县| 桐梓县| 兰坪| 永安市| 铁力市| 珲春市| 察隅县| 四平市| 田林县| 明溪县| 鹤山市| 进贤县| 精河县| 祁门县| 大新县| 陕西省| 酉阳| 白山市| 潢川县| 城口县| 永修县| 德兴市| 赤水市| 桑植县| 莱芜市| 亳州市| 虞城县| 休宁县| 黎平县| 上栗县| 萨嘎县| 定州市| 小金县| 宁强县| 宾阳县| 泰州市| 吉木萨尔县| 正阳县| 温泉县| 齐齐哈尔市|