您好,登錄后才能下訂單哦!
nagios工作正常,各個(gè)監(jiān)控頁面也可以正常顯示,唯獨(dú)maps無法顯示,提示The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server。進(jìn)到/nagios/cgi-bin/文件夾中發(fā)現(xiàn)果然沒有statusmap.cgi。
上網(wǎng)查了一下,說是可能缺下面的安裝包,
gd
gd-devel
libpng
libpng-devel
libjpeg
libjpeg-devel
zlib
zlib-devel
雖然不知道這些安裝包到底有什么用,還是查查看到底哪個(gè)沒裝。
用rpm -qa | grep 命令挨個(gè)安裝包查一遍,原來gd-devel沒裝
用yum install -y gd-devel命令安裝,裝好后回到nagios解壓的目錄執(zhí)行以下命令:
#make devclean
# ./configure --with-gd-lib=/usr/lib --with-gd-inc=/usr/include
#./configure --with-command-group=nagcmd
#make all; make install; makeinstall-init; make install-config; make install-commandmode; makeinstall-webconf
完事之后重啟nagios服務(wù),ok,maps可以正常顯示了!
不過突然發(fā)現(xiàn)監(jiān)控主機(jī)少了一臺(tái),只剩下localhost了,另外一臺(tái)遠(yuǎn)程主機(jī)看不到了!
是不是重新編譯nagios把舊的配置文件覆蓋了呢?查看nagios.cfg配置文件,
#vi /usr/local/nagios/etc/nagios.cfg
果然遠(yuǎn)程監(jiān)控主機(jī)的信息沒有了,添加
cfg_file=/usr/local/nagios/etc/objects/mylinux.cfg
重啟nagios服務(wù)之后居然報(bào)錯(cuò)了,類似于這種錯(cuò)誤
Error: Service check command 'check_nrpe!check_load' specified in service 'CPU Load' for host 'lucas_nj' not defined anywhere!
Error: Service check command 'check_nrpe!check_users' specified in service 'Current Users' for host 'lucas_nj' not defined anywhere!
Error: Service check command 'check_nrpe!check_total_procs' specified in service 'Total Processes' for host 'lucas_nj' not defined anywhere!
Error: Service check command 'check_nrpe!check_zombie_procs' specified in service 'Zombie Processes' for host 'lucas_nj' not defined anywhere!
意思說服務(wù)沒定義, 難不成commands.cfg也被覆蓋了?查看commands.cfg文件
#vi /usr/local/nagios/etc/objects/commands.cfg
乖乖,果然也覆蓋掉了,在commands.cfg文件重新添加
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe-H $HOSTADDRESS$ -c $ARG1$
}
重啟nagios服務(wù),工作正常。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。