Unable to send a notification email from Alarm action if multiple emails are separated by semicolon in vCenter alarm definition
search cancel

Unable to send a notification email from Alarm action if multiple emails are separated by semicolon in vCenter alarm definition

book

Article ID: 314028

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

When an alarm action is set up using PowerCLI to send notification emails to multiple email addresses, the emails are not sent to the expected recipients when the alarm gets triggered in vCenter Server Appliance.

Environment

  • VMware vCenter Server Appliance 8.x
  • VMware vCenter Server Appliance 7.x
  • VMware vCenter Server Appliance 6.x

Cause

When setting up multiple emails to alarm action using PowerCLI, the emails are added to the "To" field with semicolon (;) as separator by default. However, VMware vCenter Server Appliance only accepts comma (,) as separator and that causes the emails not to be sent successfully.

Resolution

Follow either of the below steps:
  • Replace semicolon (;) with comma (,) manually in vCenter alarms action configuration. Email alarm notifications will be sent successfully.
  • Set an individual alarm action for every individual email using the following sample script:

    -----------------------------------
    $emails = @('[email protected]', '[email protected]' )
    foreach ($email in $emails)
    {
    Get-AlarmDefinition -Name "Storage DRS recommendation" | New-AlarmAction -Email -To $email
    }
    -----------------------------------

Additional Information

vCenter Server Appliance email notifications are not sent when multiple email addresses are defined in an alarm action