check_procs
プロセスをチェックするプラグイン。
対象
ローカル
アーカイブ内での位置
plugins/check_procs
実行
ゾンビプロセスが1個で WARNING、 2個で CRITICAL。
/usr/local/nagios/libexec/check_procs -s Z -w 1 -c 2
その他、pでPID、uでユーザー、aで引数、Cでコマンドを限定できます。
checkcommands.cfgでの定義
vi /usr/local/nagios/etc/checkcommands.cfg
# 'check_procs' command definition define command{ command_name check_procs command_line $USER1$/check_procs -s $ARG1$ -w $ARG2$ -c $ARG3$ }
サービスの定義
define service{ use generic-service host_name hoge service_description DNS example.com 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_procs!Z!1!2 contact_groups linux-admins }