(一)在templates.cfg中增加一个配置项,设置normal_check_interval为检查时间间隔;然后在监控项配置中引用对应模板
vim templates.cfg
增加一个配置项,设置 normal_check_interval为检查时间间隔
define service{
name local-service2 ; The name of this service template
use generic-service ; Inherit default values from the generic-service definition
max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state
normal_check_interval 6 ; Check the service every 5 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until a hard state can be determined
notifications_enabled 0
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
vim service.cfg
define service{
use local-service2
host_name XXXX
service_description XXXX
check_command check_nrpe!check_db
}
(二) 直接在监控项配置时添加normal_check_interval配置项
vim service.cfg
define service{
use local-service
host_name XXXX
service_description XXXX
normal_check_interval 6
check_command check_nrpe!check_todb
}