@wpoteat All events goes through automate, so I believe an automate method could be written in the right place to do whatever is needed. If you hook the vm_created event, then you will get the basic information about the vm in the event payload. If you need more information, then you’d have to wait for the EMS refresh to complete and then send that information. I don’t believe there are events for refresh completing yet. cc @gmccullough
Here is an example event payload for a VmStartedEvent from VMware (in Ruby yaml format from our database). We parse most of that information into an EmsEvent record, so in automate can just use that, and you probably don’t need the raw event, however it should be available.
--- !ruby/hash:VimHash
key: !ruby/string:VimString
str: '43829772'
xsiType: :SOAP::SOAPInt
vimType:
chainId: !ruby/string:VimString
str: '43829771'
xsiType: :SOAP::SOAPInt
vimType:
createdTime: !ruby/string:VimString
str: '2014-07-13T12:14:07.812734Z'
xsiType: :SOAP::SOAPDateTime
vimType:
userName: !ruby/string:VimString
str: jfrey
xsiType: :SOAP::SOAPString
vimType:
datacenter: !ruby/hash:VimHash
name: !ruby/string:VimString
str: Mahwah
xsiType: :SOAP::SOAPString
vimType:
datacenter: !ruby/string:VimString
str: datacenter-1841
xsiType: :ManagedObjectReference
vimType: :Datacenter
__iv__@xsiType: :DatacenterEventArgument
__iv__@vimType:
computeResource: !ruby/hash:VimHash
name: !ruby/string:VimString
str: Production Cluster
xsiType: :SOAP::SOAPString
vimType:
computeResource: !ruby/string:VimString
str: domain-c1357
xsiType: :ManagedObjectReference
vimType: :ClusterComputeResource
__iv__@xsiType: :ComputeResourceEventArgument
__iv__@vimType:
host: !ruby/hash:VimHash
name: !ruby/string:VimString
str: testvc.manageiq.com
xsiType: :SOAP::SOAPString
vimType:
host: !ruby/string:VimString
str: host-1921
xsiType: :ManagedObjectReference
vimType: :HostSystem
__iv__@xsiType: :HostEventArgument
__iv__@vimType:
vm: !ruby/hash:VimHash
name: !ruby/string:VimString
str: jfrey-prod
xsiType: :SOAP::SOAPString
vimType:
vm: !ruby/string:VimString
str: vm-125
xsiType: :ManagedObjectReference
vimType: :VirtualMachine
path: !ruby/string:VimString
str: ! '[STARWND1] jfrey-prod/jfrey-prod.vmx'
xsiType: :xsd:string
vimType:
__iv__@xsiType: :VmEventArgument
__iv__@vimType:
fullFormattedMessage: !ruby/string:VimString
str: jfrey-prod on host testvc.manageiq.com in Production Cluster
is starting
xsiType: :SOAP::SOAPString
vimType:
changeTag: !ruby/string:VimString
str: ''
xsiType: :SOAP::SOAPString
vimType:
template: !ruby/string:VimString
str: 'false'
xsiType: :SOAP::SOAPBoolean
vimType:
eventType: VmStartingEvent
__iv__@xsiType: :VmStartingEvent
__iv__@vimType: