【问题】Unabletodeterminememoryusage
Nagios报错如下
10年的牧野网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都营销网站建设的优势是能够根据用户设备显示端的尺寸不同,自动调整牧野建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联公司从事“牧野网站设计”,“牧野网站推广”以来,每个客户项目都认真落实执行。
***** 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%
网站名称:【问题】Unabletodeterminememoryusage
标题网址:http://ybzwz.com/article/ppcggo.html