check_users の変更点
ログインしているユーザー数をチェックするプラグイン。
*対象
ローカル
*アーカイブ内での位置
plugins/check_users
*実行
ログインしているユーザーが 1人で WARNING、 2人で CRITICAL。
/usr/local/nagios/libexec/check_users -w 1 -c 2
*checkcommands.cfgでの定義
vi /usr/local/nagios/etc/checkcommands.cfg
>
# 'check_users' command definition
define command{
command_name check_users
command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
}
*サービスの定義
define service{
use generic-service
host_name hoge
service_description USERS
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_users!1!2
contact_groups linux-admins
}
*Amazon
#amazon(4774145823,left)
#amazon(4774165433,left)
#amazon(4774178659,left)