VMware Cloud Community
airinaga
Contributor
Contributor

Fully Automate Workflow with no user defined criteria?

Is it possible to fully 100% automate a workflow in vCO? All I am trying to do is have vCO send an email whenever a new snapshot has been created, without any user interaction. How would the snmp or Retrieve Messages (via MailClient) workflow be able to trigger a workflow to start without any user input?

0 Kudos
3 Replies
tschoergez
Leadership
Leadership

Hi,

in vCO workflows can be triggered fully automatically via the workflow scheduler (for time based workflow start), from an external system via the vCO REST API (needs the external system to support vCO actively of course), and via policies (so that events provided by plugins trigger the workflow).

Alternatively you can implement a "polling" logic: Schedule a workflow to run every 5 minutes or so, and check if a new email exists in a mailbox.

For your requirements, using the SNMP Plugin and alarms in vCenter sounds best: Create an alarm in vcenter that sends an SNPM trap to vCO whenever a snapshot is created. Then in vCO use a policy to start a workflow for each of these SNMP traps.

See here for examples (a bit different use case, but the same strategy)

Automatically Securing Virtual Machines Using a VMware vCenter Orchestrator (vCO) - YouTube

http://www.vcoportal.de/2012/08/vco-snmp-traps-and-vcops/ (and the articles linked there. They are about vCOps sending the SNMP traps, but from vCO perspective it's the same idea)

Cheers,

Joerg

0 Kudos
airinaga
Contributor
Contributor

Hi Joerg,

     Thanks for the helpful links. How would I go about finding the OID of the snapshot message sent by the snmp trap? The second link you posted references the VMware SNMP Mib files, but wouldn't this OID of the snapshot created be unique?

Thanks,

Adam

0 Kudos
tschoergez
Leadership
Leadership

Hi Adam,

if I remember right, at least in the data fields of the SNMP trap the VMname and snapshot name was sent.

Not sure about the OID.

To figure that out: Just create a workflow that prints out all the OID information of the received trap. Then configure the policy in a way that this workflow always is triggered (you don't necessary specify a OID filter, that's only later helpful to avoid "blasts"), no matter what SNMP trap is received.

Then configure vCenter only to send SNMP traps for the snapshot alarm.

This way your workflow should print out the data of the traps that were sent based on snapshot creation, With this information you later then can reconfigure your policy or even the SNMP device in vCO inventory and apply the OID filter.

Cheers,

Joerg

0 Kudos