更改nagios监控的检查时间

(一)在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
        }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值