Hey guys, I'm looking for some help passing variables to a batch file when using the alert action "Execute Program".
I've tried all sorts of combinations of known variables but I'm not getting the right output. Here's the trap I'm trying to process:
vmwVpxdTargetObjType=host(2)
vmwVpxdOldStatus=Yellow
vmwVpxdNewStatus=Green
vmwVpxdObjValue=Host Maintenance Mode Enter - Event: vSphere HA agent is healthy (108984238)
Summary: vSphere HA agent on host SOMESERVER in cluster Bla-Web-App in datacenter NORTH is healthy
Date: 11/27/18 20:10:49
Host: SOMESERVER
Resource pool: Bla-Web-App
Data center: NORTH
Arguments:
eventTypeId = com.vmware.vc.HA.HostDasAgentHealthyEvent
objectId = host-4611
objectName = SOMESERVER
vmwVpxdTargetObj=SOMESERVER
snmpTrapOID=VMWARE-VC-EVENT-MIB:vpxdAlarmInfo
sysUpTime=166 days 22 hours 21 minutes 54.11 seconds
experimental.1057.1.0=1.2.3.4
snmpTrapEnterprise=VMWARE-PRODUCTS-MIB:vmwVC
When I try to pass over ${vbData4} I only get the word "Host". ${vbData1,2 and 3} work fine. ${vbData5} returns nothing. ${Message} returns "SNMP".
I'm trying to put the Nodes in to maintenance in Orion when the server guys put them in to maintenance in vCenter. The scripts that do the work all function without problems but I'm not able to pass over the hostname.
Any help is greatly appreciated.