Nagios報(bào)錯(cuò)如下
創(chuàng)新互聯(lián)是一家專(zhuān)注于網(wǎng)站設(shè)計(jì)制作、網(wǎng)站制作與策劃設(shè)計(jì),龍州網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)做網(wǎng)站,專(zhuān)注于網(wǎng)站建設(shè)10年,網(wǎng)設(shè)計(jì)領(lǐng)域的專(zhuān)業(yè)建站公司;建站業(yè)務(wù)涵蓋:龍州等地區(qū)。龍州做網(wǎng)站價(jià)格咨詢(xún):028-86922220***** Nagios *****
Notification Type: PROBLEM
Service: MEM_USE
Host: s3
Address: 10.10.10.10
State: UNKNOWN
Date/Time: Tue Jun 28 17:41:42 CST 2016
Additional Info:
Unable to determine memory usage.
解決過(guò)程:
1、根據(jù)Service:MEM_USE在文件/etc/nagios/objects/hosts/s3.cfg中找到相應(yīng)配置
define service{
use generic-service ; Name of service template to use
host_name s3
service_description MEM_USE
check_command check_nrpe!check_mem_used
notifications_enabled 1
contact_groups admins,dxgroup
}
2、在s3上執(zhí)行檢查命令
[root@s3 ~]# /usr/local/nagios/libexec/check_mem.sh 85 90
/usr/local/nagios/libexec/check_mem.sh: line 57: /usr/bin/bc: 沒(méi)有那個(gè)文件或目錄
/usr/local/nagios/libexec/check_mem.sh: line 58: /usr/bin/bc: 沒(méi)有那個(gè)文件或目錄
/usr/local/nagios/libexec/check_mem.sh: line 69: bc: command not found
/usr/local/nagios/libexec/check_mem.sh: line 69: [: -eq: unary operator expected
/usr/local/nagios/libexec/check_mem.sh: line 72: bc: command not found
/usr/local/nagios/libexec/check_mem.sh: line 72: [: -eq: unary operator expected
/usr/local/nagios/libexec/check_mem.sh: line 75: bc: command not found
/usr/local/nagios/libexec/check_mem.sh: line 75: [: -eq: unary operator expected
Unable to determine memory usage.
3、按照第2步驟提示沒(méi)有安裝bc,安裝bc
[root@s3 ~]# yum -y install bc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.yun-idc.com
* extras: mirror.bit.edu.cn
* updates: mirrors.yun-idc.com
4、安裝完成后,再次執(zhí)行
[root@s3 ~]# /usr/local/nagios/libexec/check_mem.sh 85 90
OK - Memory usage is 2.200%
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線(xiàn),公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性?xún)r(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿(mǎn)足用戶(hù)豐富、多元化的應(yīng)用場(chǎng)景需求。