Listing vSphere alarms actions other than SendEmail, ExecuteScript, SendSNMP


It’s gonna be quick one today.

If you are familiar with dell openmanage integration plugin for vSphere Virtual Center, you know that it can create custom alarms. Those alarms can be triggered, and an action will be performed. What action you might wonder ? Put host into maintenance mode. If you are wondering which alarms will do this, here it is how to quickly check this.

Before we start you should know that Get-AlarmAction supports only ‘SendEmail’, ‘ExecuteScript’, ‘SendSNMP’ , since those dell alarms have something else then that, we have to change our approach to get them.
That is our alarm defined by dell openmanage integration. We want to check the actions from it.
o4

Getting the alarm definitions:

$DellAlarmDefinitions = Get-AlarmDefinition  -Name 'Dell*'
$DellAlarmDefinitions | ? {$_.Extensiondata.Info.Action.Action.Action} |Select Name, Description

o1

What is being checked is the Action object in the alarm definition. We inspect the view of the alarm by checking .Extensiondata:

o6
We can also easily make a table : Alarm name | Action to be taken

o3

Below is the source of what’s on the screenshot:

($DellAlarmDefinitions | ? {$_.Extensiondata.Info.Action.Action.Action}) | Select Name, @{n='Action';e={$_.Extensiondata.Info.Action.Action.Action.Name}}

This might now work within Powershell v2, so make sure you are running this in v3, or modify the lines.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s