[root@test ~]# cat /usr/local/nagios/etc/services/192.168.0.103.cfg
define host{
use linux-server,host-pnp
host_name test
alias test
address 192.168.0.103
}
define service{
use generic-service,service-pnp
host_name test
service_description check_ping
check_command check_ping!100.0,20%!200.0,50%
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service,service-pnp
host_name test
service_description Root Partition
check_command check_local_disk!20%!10%!/
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service,service-pnp
host_name test
service_description check_ssh
check_command check_ssh
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service,service-pnp
host_name test
service_description Swap Usage
check_command check_local_swap!20!10
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service,service-pnp
host_name test
service_description Total Processes
check_command check_local_procs!544!744!RSZDT
max_check_attempts 5
normal_check_interval 1
}
#define hostgroup{
# hostgroup_name client ; The name of the hostgroup
# alias client ; Long name of the group
# members test ; Comma separated list of hosts that belong to this group
# }
[root@test ~]#
define host{
use linux-server,host-pnp
host_name test
alias test
address 192.168.0.103
}
define service{
use generic-service,service-pnp
host_name test
service_description check_ping
check_command check_ping!100.0,20%!200.0,50%
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service,service-pnp
host_name test
service_description Root Partition
check_command check_local_disk!20%!10%!/
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service,service-pnp
host_name test
service_description check_ssh
check_command check_ssh
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service,service-pnp
host_name test
service_description Swap Usage
check_command check_local_swap!20!10
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service,service-pnp
host_name test
service_description Total Processes
check_command check_local_procs!544!744!RSZDT
max_check_attempts 5
normal_check_interval 1
}
#define hostgroup{
# hostgroup_name client ; The name of the hostgroup
# alias client ; Long name of the group
# members test ; Comma separated list of hosts that belong to this group
# }
[root@test ~]#