[英]How to configure email notifications for specific services only in nagios or icinga?
我收到所有服務的關鍵警告電子郵件通知。 我只想獲取特定服務的電子郵件通知,例如磁盤使用情況,Windows Update。
這些是我的服務:
定義服務{
hostgroup windows
use generic-service ; Name of service template to use
service_description CPU Load
check_command check_windows_cpu!60,90,95
}
定義服務{
hostgroup windows
use generic-service ; Name of service template to use
service_description Memory Usage
check_command check_windows!MEMUSE
}
定義服務{
hostgroup windows
use generic-service ; Name of service template to use
service_description C: Disk Space
check_command check_windows_disk
}
定義服務{
hostgroup windows
use generic-service ; Name of service template to use
service_description Windows Essential Updates
check_command check_win_essential_updates
}定義服務{
hostgroup windows
use generic-service ; Name of service template to use
service_description Windows Updates
check_command check_available_updates
}
我的contact.cfg是:
定義聯系人{
contact_name root
alias Root
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email sysadmin@example.com
}
有什么建議只從選定的服務獲得關鍵通知嗎?
謝謝。
請參閱服務定義 。
只需添加
notification_options c
服務定義。
如果您根本不想從其他服務獲得任何電子郵件,請添加
notifications_enabled 0
那些您不想收到電子郵件的服務。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.