Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 206069

Re: Script to export Alarms from VCenter to analyze.

$
0
0

Hi James,

 

Please try the following (assuming you are connected to vCenter server via PowerCLI):

 

$output = foreach ($alarm in Get-AlarmAction) { $alarm | Select-Object @{N="Alarm";E={$_.AlarmDefinition}}, @{N="Action Type";E={$_.ActionType}}, @{N="Trigger";E={[string]::Joi

n(",",($_.Trigger))}} }

$output | Export-CSV "C:\alarm.csv"

 

Modify the bold and italic to change the output path.

 

Sample Output:

 

"Alarm","Action Type","Trigger"

"Timed out starting Secondary VM","SendSNMP","Yellow -> Red (Repeat)"

"No compatible host for Secondary VM","SendSNMP","Yellow -> Red (Repeat)"

 

Hope this helps,

Steven.


Viewing all articles
Browse latest Browse all 206069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>