nagios监控(四)
同理可以监控任意端口如:80,110,25,8080,873 都可以。cd /usr/local/nagios/etc/objects/
vi host.cfg
切到末尾加上
define service{
use generic-service
host_name 197-etiantian-1-1
service_description ssh_22
check_command check_tcp!22
max_check_attempts 3
normal_check_interval 2
retry_check_interval 1
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
contact_groups admins
}
define service{
use generic-service
host_name 197-etiantian-1-1
service_description http_80
check_command check_tcp!80
max_check_attempts 3
normal_check_interval 2
retry_check_interval 1
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
contact_groups admins
}
define service{
use generic-service
host_name 197-etiantian-1-1
service_description http_80_ssh_22
check_command check_tcp!80!22
max_check_attempts 5
normal_check_interval 3
retry_check_interval 3
check_period 24x7
notification_interval 20
notification_period 24x7
notification_options w,u,c,r
contact_groups admins
process_perf_data 1
}
添加完毕后别忘了在客户端开启80端口
页:
[1]