VMware Cloud Community
paradox
Enthusiast
Enthusiast
Jump to solution

Report on configured alarms

Hi All,

I am chasing an easy way to export all alarms and where they have actions list the actions as well.

Does anybody have a near script to do this?

Really a combination of get-alarmdefinition and get-alarmaction i guess.  My powercli skills are a little weak so looking for some pointers!

The desired output is really a report showing the status of alarms in vcenter environment and detecting configuration errors.

thanks all Smiley Happy

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You can do something like this

Get-AlarmDefinition |
Select Name,Entity,Enabled,
 
@{N="Action";E={[string]::Join(',',(Get-AlarmAction $_ | Select -ExpandProperty ActionType))}}

Note that this can be expanded, depending on what you want to see in the report.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

You can do something like this

Get-AlarmDefinition |
Select Name,Entity,Enabled,
 
@{N="Action";E={[string]::Join(',',(Get-AlarmAction $_ | Select -ExpandProperty ActionType))}}

Note that this can be expanded, depending on what you want to see in the report.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
paradox
Enthusiast
Enthusiast
Jump to solution

Thanks LucD, perfect!   I did grab this code and use it some time ago to solve my requirement, just took me a while to get back here and say thanks Smiley Happy

Dan

Reply
0 Kudos