我可以将nagios主机和服务配置,指定的联系人和contacts_groups放在一起吗?我的意思是,如果我不通知联系人或仅通知组。
e.g。
define host{
host_name bogus-router
alias Bogus Router #1
address 192.168.1.254
parents server-backbone
check_command check-host-alive
check_interval 5
retry_interval 1
max_check_attempts 5
check_period 24x7
process_perf_data 0
retain_nonstatus_information 0
contacts specyfic-admin
contact_groups router-admins
notification_interval 30
notification_period 24x7
notification_options d,u,r
}
答案 0 :(得分:0)
Yes.
From the documentation:
contacts: This is a list of the short names of the contacts that should be notified whenever there are problems (or recoveries) with this host. Multiple contacts should be separated by commas. Useful if you want notifications to go to just a few people and don't want to configure contact groups. You must specify at least one contact or contact group in each host definition.
contact_groups: This is a list of the short names of the contact groups that should be notified whenever there are problems (or recoveries) with this host. Multiple contact groups should be separated by commas. You must specify at least one contact or contact group in each host definition.
Actually - now that I copy that I'm not so sure it describes the answer properly.
You may also want to look at Object Inheritance.
But, the short answer is still a yes.