Unable to determine memory usage

Nagios报错如下

***** Nagios *****
Notification Type: PROBLEM

Service: MEM_USE
Host: s3
Address: 10.10.16.103
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上执行检查命令

[[email protected]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

[[email protected] ~]# 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、安装完成后,再次执行

[[email protected] ~]# /usr/local/nagios/libexec/check_mem.sh 85 90
OK - Memory usage is 2.200%

时间: 2024-10-23 21:50:05

Unable to determine memory usage的相关文章

hbase异常:java.io.IOException: Unable to determine ZooKeeper ensemble

项目中用到hbase,有时候可能会报一些异常,比如java.io.IOException: Unable to determine ZooKeeper ensemble 等等,当出现这个问题时,某某说是项目中用到线程池的问题导致的,但查看异常之后,并非跟啥线程池有关系,异常信息如下: java.io.IOException: Unable to determine ZooKeeper ensemble at org.apache.hadoop.hbase.zookeeper.ZKUtil.con

Instrumentation: querying the memory usage of a Java object

Copy from: http://www.javamex.com/tutorials/memory/instrumentation.shtml Instrumentation: querying the memory usage of a Java object The most reliable— but not necessarily the easiest— way to estimate the usage of a Java object is to ask the JVM. Que

5 commands to check memory usage on Linux

Memory Usage On linux, there are commands for almost everything, because the gui might not be always available. When working on servers only shell access is available and everything has to be done from these commands. So today we shall be checking th

创建Hbase Hive外部表报错: Unable to determine ZooKeeper ensemble

创建HBase的Hive外部表 1: create external table ttt(rowkey string,info map<string,string>)STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,info:") TBLPROPERTIES ("hb

Nagios Server通过NRPE监控client memory usage.

How to monitor server memory usage with Nagios Remote Plugin Executor (NRPE) Last updated on September 8, 2014 Authored by Sarmed Rahman 5 Comments In a previous tutorial, we have seen how we can set up Nagios Remote Plugin Executor (NRPE) in an exis

iOS Interface builder was unable to determine the type of xxx.xib / xxx.storyboard

上午开工程出现, "Interface builder was unable to determine the type of xxx.xib" 错误svn上报冲突(conflict),xib文件爆红 郁闷 百度 google stack 没有找到答案 于是只能,喝口奶自己研究xib的真身是xml文件, 于是右键 OpenAs Source Code看源代码打开便看到嫌疑犯 根标签下有冲突,于是,将"==="删除.删除后编译 又爆出 "Extra cont

Reducing and Profiling GPU Memory Usage in Keras with TensorFlow Backend

keras 自适应分配显存 & 清理不用的变量释放 GPU 显存 Intro Are you running out of GPU memory when using keras or tensorflow deep learning models, but only some of the time? Are you curious about exactly how much GPU memory your tensorflow model uses during training? Are

ValueError: Unable to determine SOCKS version from socks://127.0.0.1:1080/

使用ss之后输入conda指令出现错误:“ValueError: Unable to determine SOCKS version from socks://127.0.0.1:1080/”. 解决方法: 在终端中输入 unset all_proxy && unset ALL_PROXY export all_proxy="socks5://127.0.0.1:1080" 这只能在当前终端的使用中有效,重新打开的终端中仍然会有错误. 原文地址:https://www.

NRPE Memory usage monitor script

#!/usr/bin/perl -w # Heavily based on the script from: # check_mem.pl Copyright (C) 2000 Dan Larsson <[email protected]> # heavily modified by # Justin Ellison <[email protected]> # # The MIT License (MIT) # Copyright (c) 2011 [email protected