java nagios_主机和服务的Nagios通知

在服务定义中,您需要设置contact_groups(并在其他地方定义组) . 这是一个例子:

define service{

name A-service ; The 'name' of this service template

active_checks_enabled 1 ; Active service checks are enabled

passive_checks_enabled 1 ; Passive service checks are enabled/accepted

parallelize_check 1 ; Active service checks should be parallelized

obsess_over_service 1 ; We should obsess over this service (if necessary)

check_freshness 0 ; Default is to NOT check service 'freshness'

notifications_enabled 1 ; Service notifications are enabled

event_handler_enabled 1 ; Service event handler is enabled

flap_detection_enabled 1 ; Flap detection is enabled

failure_prediction_enabled 1 ; Failure prediction is enabled

process_perf_data 1 ; Process performance data

retain_status_information 1 ; Retain status information across program restarts

retain_nonstatus_information 1 ; Retain non-status information across program restarts

notification_interval 0 ; Only send notifications on status$

is_volatile 0

check_period 24x7

normal_check_interval 5

retry_check_interval 1

max_check_attempts 4

notification_period 24x7

notification_options w,u,c,r

contact_groups A_only ; >>>Here's the magic you need<<<

register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SE$

}

# for contact config file

define contactgroup{

contactgroup_name A_only

alias APeople

members APerson1, APerson2

}

对于B组,将A_only更改为B_only并创建一个新的联系人组 .

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值