VMware Cloud Community
bramqu
Contributor
Contributor
Jump to solution

How to set e-mail notifications on all the default alarms?

Hi,

we have a vmware 6 cluster with vCenter but we never enabled the e-mail alerts to be notified about downtime or other stuff going wrong Smiley Wink

Now we would like to do that through vCenter but when I see all the default alarms we see 158 alarms where apparantly I have to set all the e-mail notification per alarm. Is that the only way or is it possible to set the e-mail notification to an e-mail address for all the alarms at once?

Regards,

Bram

0 Kudos
1 Solution

Accepted Solutions
Mattallford
Hot Shot
Hot Shot
Jump to solution

Sorry about the delay. Something like the below should do the trick. Make sure you test first / snapshot prior to making the changes.

This should result in the following configuration and yep, you can go ahead and modify via the GUI after configuring with PowerCLI.

Alarms.PNG

Connect-VIServer vCenterServer

$Alarms = Get-AlarmDefinition

foreach ($Alarm in $Alarms){

$Alarm | New-AlarmAction -Email -To 'email@domain.com'

$Alarm | Get-AlarmAction | New-AlarmActionTrigger -StartStatus 'green' -Endstatus 'Yellow'

$Alarm | Get-AlarmAction | New-AlarmActionTrigger -StartStatus 'Red' -Endstatus 'Yellow'

$Alarm | Get-AlarmAction | New-AlarmActionTrigger -StartStatus 'yellow' -Endstatus 'green'

}

VCP6-DCV | VCAP6-DCV Deploy @mattallford If you found my answers useful, please help me by marking them as Helpful or Correct!

View solution in original post

0 Kudos
4 Replies
Mattallford
Hot Shot
Hot Shot
Jump to solution

‌Hi Bram,

This can be done in an automated way via PowerCLI. I will post an example in a couple of hours when near the computer. Do you want to be alerted on all status changes (green > yellow, yellow > red, red > yellow and yellow > green), or only some?

Cheers, Matt.

VCP6-DCV | VCAP6-DCV Deploy @mattallford If you found my answers useful, please help me by marking them as Helpful or Correct!
0 Kudos
bramqu
Contributor
Contributor
Jump to solution

Hi Matt,

first of all thanks for offering your assistance!

What I would like is an alert (email) on every status change so if that can be done that would be excellent! And if I would like to change only one or a few afterwords, is that still possible through the Web client?

Regards,

Bram

0 Kudos
Mattallford
Hot Shot
Hot Shot
Jump to solution

Sorry about the delay. Something like the below should do the trick. Make sure you test first / snapshot prior to making the changes.

This should result in the following configuration and yep, you can go ahead and modify via the GUI after configuring with PowerCLI.

Alarms.PNG

Connect-VIServer vCenterServer

$Alarms = Get-AlarmDefinition

foreach ($Alarm in $Alarms){

$Alarm | New-AlarmAction -Email -To 'email@domain.com'

$Alarm | Get-AlarmAction | New-AlarmActionTrigger -StartStatus 'green' -Endstatus 'Yellow'

$Alarm | Get-AlarmAction | New-AlarmActionTrigger -StartStatus 'Red' -Endstatus 'Yellow'

$Alarm | Get-AlarmAction | New-AlarmActionTrigger -StartStatus 'yellow' -Endstatus 'green'

}

VCP6-DCV | VCAP6-DCV Deploy @mattallford If you found my answers useful, please help me by marking them as Helpful or Correct!
0 Kudos
bramqu
Contributor
Contributor
Jump to solution

Thanks for your help, worked like a charm and saved me soooo much work Smiley Wink

Have a good one!

Regards,

Bram

0 Kudos