Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

第17章 イベント通知

17.1. 管理ポータルでのイベント通知の設定

Red Hat Virtualization Manager が管理する環境内で特定のイベントが発生した場合には、Red Hat Virtualization Manager は指定したユーザーにメールで通知することができます。この機能を使用するには、メール転送エージェントを設定する必要があります。管理ポータルで設定できるのは、メール通知のみです。Manager のマシンで、SNMP トラップを設定する必要があります。

イベント通知の設定

  1. RHVM から自動メッセージを受け取りそれを配信リストに配信することのできるメールサーバーにアクセスできる必要があります。
  2. 管理ユーザー をクリックし、ユーザーを選択します。
  3. ユーザーの ユーザー名 をクリックし、詳細ページに移動します。
  4. イベント通知機能 タブで イベントを管理 をクリックします。
  5. すべてを展開 ボタンまたはカテゴリー別の展開ボタンを使用してイベントを表示します。
  6. 該当するチェックボックスを選択します。
  7. メール受信者 のフィールドに電子メールアドレスを入力します。

    注記

    電子メールアドレスには、テキストメッセージ用アドレス (例: 1234567890@carrierdomainname.com)、または電子メールアドレスおよびテキストメッセージ用アドレスからなる電子メールグループアドレスを設定することができます。

  8. OK をクリックします。
  9. Manager マシンにおいて、ovirt-engine-notifier.conf をコピーし 90-email-notify.conf という名前の新規ファイルとして保存します。

    # cp /usr/share/ovirt-engine/services/ovirt-engine-notifier/ovirt-engine-notifier.conf /etc/ovirt-engine/notifier/notifier.conf.d/90-email-notify.conf
  10. 90-email-notify.conf を編集し、EMAIL Notifications セクション以外はすべて削除します。
  11. 以下に示す例のように、正しい電子メールの変数を入力します。このファイルは、もとの ovirt-engine-notifier.conf ファイルの値に優先します。

    ---------------------
    # EMAIL Notifications #
    ---------------------
    
    # The SMTP mail server address. Required.
    MAIL_SERVER=myemailserver.example.com
    
    # The SMTP port (usually 25 for plain SMTP, 465 for SMTP with SSL, 587 for SMTP with TLS)
    MAIL_PORT=25
    
    # Required if SSL or TLS enabled to authenticate the user. Used also to specify 'from' user address if mail server
    # supports, when MAIL_FROM is not set. Address is in RFC822 format
    MAIL_USER=
    
    # Required to authenticate the user if mail server requires authentication or if SSL or TLS is enabled
    SENSITIVE_KEYS="${SENSITIVE_KEYS},MAIL_PASSWORD"
    MAIL_PASSWORD=
    
    # Indicates type of encryption (none, ssl or tls) should be used to communicate with mail server.
    MAIL_SMTP_ENCRYPTION=none
    
    # If set to true, sends a message in HTML format.
    HTML_MESSAGE_FORMAT=false
    
    # Specifies 'from' address on sent mail in RFC822 format, if supported by mail server.
    MAIL_FROM=rhevm2017@example.com
    
    # Specifies 'reply-to' address on sent mail in RFC822 format.
    MAIL_REPLY_TO=
    
    # Interval to send smtp messages per # of IDLE_INTERVAL
    MAIL_SEND_INTERVAL=1
    
    # Amount of times to attempt sending an email before failing.
    MAIL_RETRIES=4
    注記

    他のオプションについては、/etc/ovirt-engine/notifier/notifier.conf.d/README を参照してください。

  12. ovirt-engine-notifier サービスを有効化および再起動すると、変更した内容が有効になります。

    # systemctl daemon-reload
    # systemctl enable ovirt-engine-notifier.service
    # systemctl restart ovirt-engine-notifier.service

Red Hat Virtualization 環境のイベントに基づいて、指定したユーザーに電子メールが送信されるようになりました。選択したイベントは、そのユーザーの イベント通知機能 タブに表示されます。