【问题】Unabletodeterminememoryusage-创新互联
Nagios报错如下
创新互联是一家专注于网站设计制作、网站制作与策划设计,龙州网站建设哪家好?创新互联做网站,专注于网站建设10年,网设计领域的专业建站公司;建站业务涵盖:龙州等地区。龙州做网站价格咨询: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.
解决过程:
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%
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
名称栏目:【问题】Unabletodeterminememoryusage-创新互联
链接URL:http://azwzsj.com/article/dhgjpg.html