您好,登錄后才能下訂單哦!
Nagios報錯如下
***** 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.
解決過程:
1、根據Service:MEM_USE在文件/etc/nagios/objects/hosts/s3.cfg中找到相應配置
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上執行檢查命令
[root@s3 ~]# /usr/local/nagios/libexec/check_mem.sh 85 90
/usr/local/nagios/libexec/check_mem.sh: line 57: /usr/bin/bc: 沒有那個文件或目錄
/usr/local/nagios/libexec/check_mem.sh: line 58: /usr/bin/bc: 沒有那個文件或目錄
/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步驟提示沒有安裝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、安裝完成后,再次執行
[root@s3 ~]# /usr/local/nagios/libexec/check_mem.sh 85 90
OK - Memory usage is 2.200%
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。