Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

Chapter 17. Event Notifications

17.1. Configuring Event Notifications in the Administration Portal

The Red Hat Virtualization Manager can notify designated users via email when specific events occur in the environment that the Red Hat Virtualization Manager manages. To use this functionality, you must set up a mail transfer agent to deliver messages. Only email notifications can be configured through the Administration Portal. SNMP traps must be configured on the Manager machine.

Configuring Event Notifications

  1. Ensure that you have access to an email server that can accept automated messages from RHVM and deliver them to a distribution list.
  2. Click AdministrationUsers and select a user.
  3. Click the user’s User Name to go to the details page.
  4. In the Event Notifier tab, click Manage Events.
  5. Use the Expand All button or the subject-specific expansion buttons to view the events.
  6. Select the appropriate check boxes.
  7. Enter an email address in the Mail Recipient field.

    Note

    The email address can be a text message email address (for example, 1234567890@carrierdomainname.com) or an email group address that includes email addresses and text message email addresses.

  8. Click OK.
  9. On the Manager machine, copy ovirt-engine-notifier.conf to a new file called 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. Edit 90-email-notify.conf, deleting everything except the EMAIL Notifications section.
  11. Enter the correct email variables, as in the example below. This file overrides the values in the original ovirt-engine-notifier.conf file.

    ---------------------
    # 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
    Note

    See /etc/ovirt-engine/notifier/notifier.conf.d/README for more options.

  12. Enable and restart the ovirt-engine-notifier service to activate the changes you have made:

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

The specified user now receives emails based on events in the Red Hat Virtualization environment. The selected events are displayed on the Event Notifier tab for that user.