第21章 イベント通知

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

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

イベント通知の設定

  1. Manager からの自動メッセージを受け入れ、それらを配布リストに配信できる電子メールサーバーにアクセスできることを確認してください。
  2. AdministrationUsers をクリックして、ユーザーを選択します。
  3. ユーザーの ユーザー名 をクリックすると、詳細ページが表示されます。
  4. Event Notifier タブで、Manage Events をクリックします。
  5. イベントを表示するには、Expand All ボタン、または件名別の展開ボタンを使用します。
  6. 適切なチェックボックスを選択します。
  7. Mail Recipient 欄にメールアドレスを入力します。

    注記

    電子メールアドレスは、テキストメッセージの電子メールアドレス (たとえば、1234567890@carrierdomainname.com)、または電子メールアドレスとテキストメッセージの電子メールアドレスを含む電子メールグループアドレスにすることができます。

  8. OK をクリックします。
  9. Manager マシンで、ovirt-engine-notifier.conf90-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 環境のイベントに基づいて電子メールを受け取るようになりました。選択されたイベントは、そのユーザーの Event Notifier タブに表示されます。