特定のサービスの通知メールのみをユーザーに送信するように、nagios のメール アラートを設定しようとしています。
このサービスが危機的状況にある場合にのみ通知メールを受け取るユーザーを作成したい
特定のサービスの通知メールのみをユーザーに送信するように、nagios のメール アラートを設定しようとしています。
このサービスが危機的状況にある場合にのみ通知メールを受け取るユーザーを作成したい
http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#contactによると
あなたの連絡先には、このスキームを使用してください。管理者ごとに 1 つの servicecontact が必要で、メールを取得する特定のサービスの連絡先として設定します。(覚えておいてください: カンマで区切って複数の連絡先を指定できます)
通知なしのテンプレート:
define contact{
name no-notifications
host_notification_period 24x7
service_notification_period 24x7
host_notification_commands notifications-disabled
service_notification_commands notifications-disabled
host_notification_options n
service_notification_options n
host_notifications_enabled 0
service_notifications_enabled 0
register 0
}
重要なサービスのテンプレート:
define contact{
name service-only
host_notification_period **TIMEPERIOD**
service_notification_period **TIMEPERIOD**
host_notification_commands notifications-disabled
service_notification_commands notify-service-by-email
host_notification_options n
service_notification_options c
host_notifications_enabled 0
service_notifications_enabled 1
register 0
}
あなたのブロック連絡先:
define contact{
contact_name nohost
use no-notifications
}
あなたのサービス連絡先:
define contact{
contact_name **Admin Name**
use service-only
}
ホスト構成:
define host{
use host-template-linux
host_name Bezeqint2
hostgroups **if you have any**
address **the IP**
contacts nohost
}
サービス構成
define service {
use generic-service ; defined in templates
host_name Bezeqint2
service_description VI
check_command check_http3! -H usabrm.dainfo.com -u /Anti-Aging/Template1/Pages/LoginPageBRM.aspx -s "txtUserName"
contacts **Admin Name**
}