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

溫馨提示×

溫馨提示×

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

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

Ngios plugin for cacti(NPC)

發布時間:2020-08-10 07:39:42 來源:網絡 閱讀:4587 作者:木魚梵心 欄目:移動開發

Ngios plugin forcacti(NPC)

1.實驗環境:

rhel6.3

cactingios主機:desk32.example.com192.168.122.32

需要的安裝包:

ndoutils-1.4b9.tar.gz

php-devel-5.3.3-3.el6_2.8.x86_64.rpm

PDO_MYSQL-1.0.2.tgz

cacti的安裝配置參見:http://wangziyin.blog.51cto.com/6948950/1305443

nagios的安裝配置參見:http://wangziyin.blog.51cto.com/6948950/1305465

2.NPC的安裝配置:

1.npccacti的一個插件,其作用是將nagios的監控信息整合到cacti的監控頁面中。

2.npc的安裝:

首先確保你的php 支持 pdo json 模塊

選擇Setting

Ngios plugin for cacti(NPC)

選擇NPC

Ngios plugin for cacti(NPC)

Ngios plugin for cacti(NPC)

Ngios plugin for cacti(NPC)

保存退出,

[root@desk32 ~]# vim/usr/local/nagios/etc/nagios.cfg

broker_module=/usr/local/nagios/bin/ndomod.oconfig_file=/usr/local/nagios/etc/ndomod.cfg

[root@desk32 ~]# tar zxf ndoutils-1.4b9.tar.gz

[root@desk32ndoutils-1.4b9]# ./configure –enable-mysql

[root@desk32ndoutils-1.4b9]# make && make install

[root@desk32ndoutils-1.4b9]# cd src/

[root@desk32 src]# cpndomod-3x.o /usr/local/nagios/bin/ndomod.o

[root@desk32 src]# cpndo2db-3x /usr/local/nagios/bin/ndo2db

[root@desk32 src]# cd../config

[root@desk32 config]# cpndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg

[root@desk32 config]# cpndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg

[root@desk32 config]# cd/usr/local/nagios/bin/

[root@desk32 bin]# chownnagios.nagios * -R

[root@desk32 bin]# cd/usr/local/nagios/etc/

[root@desk32 etc]# chownnagios.nagios * -R

[root@desk32 etc]# vimndo2db.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=cacti

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=1

debug_verbosity=1

debug_file=/usr/local/nagios/var/ndo2db.debug

max_debug_file_size=1000000

[root@desk32 etc]# vimndomod.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

[root@desk32 etc]#/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg

沒有報錯即可

[root@desk32 etc]# ps ax

6798? Ss 0:00 /usr/local/nagios/bin/ndo2db -c/usr/local/nagios/etc/ndo2db.cfg

[root@desk32 etc]#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

[root@desk32 etc]#/etc/init.d/nagios restart

[root@desk32 html]# vim/var/www/html/cacti/include/config.php

打開:$cacti_session_name= "Cacti";

測試:

http://desk32/cacti

選擇NPC插件:

然后選擇Reporting下的Nagios

Ngios plugin for cacti(NPC)

可以看見cacti下可以查看nagios的頁面.

此時執行cat /var/log/messages 可看到如下報錯:

Aug 3003:51:18 desk32 ndo2db: mysql_error: 'Unknown column 'long_output' in'field list''

NPC下的

Ngios plugin for cacti(NPC)

所有的界面都沒有顯示:

解決方法如下:


[root@desk32 ~]# mysql-pwestos cacti < add.sql

[root@desk32 ~]# cat add.sql

ALTERTABLE `npc_hostchecks` ADD COLUMN `long_output` varchar(8192) NOTNULL default '' AFTER `output`;

ALTERTABLE `npc_hoststatus` ADD COLUMN `long_output` varchar(8192) NOTNULL default '' AFTER `output`;

ALTERTABLE `npc_servicechecks` ADD COLUMN `long_output` varchar(8192) NOTNULL default '' AFTER `output`;

ALTERTABLE `npc_servicestatus` ADD COLUMN `long_output` varchar(8192) NOTNULL default '' AFTER `output`;

ALTERTABLE `npc_statehistory` ADD COLUMN `long_output` varchar(8192) NOTNULL default '' AFTER `output`;

ALTERTABLE `npc_eventhandlers` ADD COLUMN `long_output` varchar(8192) NOTNULL default '' AFTER `output`;

ALTERTABLE `npc_systemcommands` ADD COLUMN `long_output` varchar(8192) NOTNULL default '' AFTER `output`;

ALTERTABLE `npc_notifications` ADD COLUMN `long_output` varchar(8192) NOTNULL default '' AFTER `output`;

[root@desk32 ~]# tar zxfPDO_MYSQL-1.0.2.tgz

[root@desk32 ~]# cdPDO_MYSQL-1.0.2

[root@desk32 ~]# rpm -ivhphp-devel-5.3.3-3.el6_2.8.x86_64.rpm

[root@desk32PDO_MYSQL-1.0.2]# phpize

如果是源碼安裝的phpmysql的化可能會出現找不到include文件,與mysql的位置:

{# ln -s/usr/local/lnmp/mysql/include/* /usr/local/include/

[# ./configure --with-php-config=/usr/local/lnmp/php/bin/php-config–with-pdo-mysql=/usr/local/lnmp/mysql/

}

[root@desk32PDO_MYSQL-1.0.2]# ./configure

[root@desk32PDO_MYSQL-1.0.2]# make

[root@desk32PDO_MYSQL-1.0.2]# make install

[root@desk32PDO_MYSQL-1.0.2]# vim /etc/php.ini

添加:extension=pdo_mysql.so


測試:

[root@desk32 html]# vim/var/www/html/index.php

<?php

phpinfo();

?>

http://desk32/index.php

出現php包含了pdo_mysql模塊,即可以:

Ngios plugin for cacti(NPC)

再訪問cactihttp://desk32/cacti

Ngios plugin for cacti(NPC)

Ngios plugin for cacti(NPC)

一切搞定.有什么問題聯系!!!!!




西安石油大學計算機學院

王茲銀

904483782

mailofwzy@qq.com

2013-10-07


附件:http://down.51cto.com/data/2363583
向AI問一下細節

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

AI

陕西省| 南昌县| 荃湾区| 辽源市| 瑞昌市| 安福县| 通道| 遂平县| 玉山县| 富蕴县| 武宁县| 米脂县| 鹤山市| 乌鲁木齐市| 肥乡县| 泸州市| 宜兰县| 西城区| 繁峙县| 仪征市| 永新县| 浦城县| 桓台县| 溧阳市| 嘉定区| 长丰县| 阜平县| 苗栗县| 大荔县| 海丰县| 广丰县| 平凉市| 章丘市| 博客| 凤山县| 舒城县| 福海县| 嵊泗县| 和静县| 新巴尔虎右旗| 博爱县|