Automation

 View Only
  • 1.  list of every triggers configurable in vCenter

    Posted Oct 04, 2012 11:05 AM

    Hi,

    I’m looking to extract the whole alarms triggers for every alarm type (hosts, VM, etc…) for either event or condition

    I checked the Get-AlarmActionTrigger or Get-AlarmDefinition but it lists only the alarms already defined within vCenter.

    Any idea?

    Thank you

    Eric



  • 2.  RE: list of every triggers configurable in vCenter
    Best Answer

    Posted Oct 04, 2012 11:14 AM

    Not 100% sure I understand what you're after, but if you want tofind out which types of triggers are available, you better start with the AlarmExpression object in the SDK Reference.

    Look at the Extended By line, that shows what kind of triggers exists.

    In my Alarm expressions – Part 1 : Metric alarms and Alarm expressions – Part 2 : Event alarms posts I go further into event and metric alarm triggers.

    Is that what you are looking for ?



  • 3.  RE: list of every triggers configurable in vCenter

    Posted Oct 04, 2012 01:43 PM

    Hi Luc,

    awesome.

    the following part you made from your Alarm expressions – Part 2 : Event  alarms might really be what I'm looking for.

    $extMgr = Get-View ExtensionManager
    $extMgr.ExtensionList | %{
    if($_.EventList -ne $null){
    $_.Key
    $_.EventList | %{
    "`t" + $_.EventId
    }
    }
    }

    this means that the ExtensionList contains every "VMware.Vim.EventAlarmExpression".

    I also noticed that the description of the event is in the $_.EventTypeSchema

    this was exactly what I was looking for.

    thank you for your excellency.

    sincerely

    Eric