command.cfg
Code: Select all
#check_proc_cpu
define command{
command_name check_proc_cpu
command_line $USER1$/check_proc_cpu -H $HOSTADDRESS$ $ARG1$
}
# 'check_cpu' command definition
# w = Warning level (if CPU % idle falls below this level - must be a percentage)
# c = Critical level
define command{
command_name check_cpu
command_line $USER1$/check_cpu -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$
}
# 'check_swap' command definition
# w = Warning level (if % or MB swap free drops below this level)
# c = Critical level
define command{
command_name check_swap_cpu
command_line $USER1$/check_swap_cpu -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$
}
# 'check_ram' command definition
# w = Warning level defined as percentage (with % sign) or in megabytes (without % sign)
# c = Critical level (can be defined as percentage or MB independently of warning)
# o = below|above --> if mem [free drops BELOW] or [used rises ABOVE] thresholds
define command{
command_name check_ram_cpu
command_line $USER1$/check_ram_cpu -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$ -o $ARG3$
}
# 'check_load' command definition
# w = Warning levels (alert if n,n,n (1,5,15 minute load averages) go above these levels)
# c = Critical levels
define command{
command_name check_load_cpu
command_line $USER1$/check_load_cpu -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$
}
Code: Select all
define service {
use generic-service
host_name node_1
service_description SSH
check_command check_ssh
#notifications_enabled 0
}
define service {
use generic-service
host_name node_1
service_description Current_cpu_usage
check_command check_proc_cpu
#notifications_enabled 0
}
define service {
use generic-service
host_name node_1
service_description Processor_usage
check_command check_cpu
}
define service {
use generic-service
host_name node_1
service_description Processor_swap
check_command check_swap_cpu
}
define service {
use generic-service
host_name node_1
service_description RAM
check_command check_ram_cpu
}
define service {
use generic-service
host_name node_1
service_description Processor_load
check_command check_load_cpu
}