Top/Nagios/プラグイン/check_mem

check_memはてなブックマーク

メモリの空き(or 使用)容量をチェックするプラグイン。

対象

ローカル

アーカイブ内での位置

contrib/check_mem.pl

必要なもの

  • perl

インストール

cp contrib/check_mem.pl /usr/local/nagios/libexec/check_mem
chmod a+x /usr/local/nagios/libexec/check_mem

実行

メモリの空き容量が 20% で WARNING、 10% で CRITICAL。

/usr/local/nagios/libexec/check_mem -f -w 20 -c 10

checkcommands.cfgでの定義

vi /usr/local/nagios/etc/checkcommands.cfg
# 'check_mem' command definition
define command{
        command_name    check_mem
        command_line    $USER1$/check_mem -f -w $ARG1$ -c $ARG2$
        }

サービスの定義

define service{
        use                             generic-service
        host_name                       hoge
        service_description             MEMORY
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        notification_interval           240
        notification_period             24x7
        notification_options            c,r
        check_command                   check_mem!20!10
        contact_groups                  linux-admins
        }

Amazon

差分 一覧