[SOLVED] Provision Notification emails

How you enable provisioning notification emails? I have read http://manageiq.org/pdf/ManageIQ-0-Lifecycle_and_Automation_Guide-en-US.pdf but namespace “Alert” does not exist.

Try to reset the automation engine:

cd /var/www/miq/vmdb
script/rails runner script/rake evm:automate:reset

But first of all, create a backup just in case:

cd /var/www/miq/vmdb
script/rails runner script/rake evm:automate:backup FILE=backup_filename.xml

What I did then was just install a fresh installation to our testing environment and see if the Alert namespace that is mentioned in the manuals ever existed. It did not. So I am pretty sure that I had not deleted it somehow by accident.

My Manage IQ version on both installations are anand-1 on vmware. Installed from the .ova from manageiq.org.

The automate model has been restructured and the /Alert namespace no longer exists. The provisioning instances in the /Alert/Emailnotifications class are now located in the email classes of the provision namespaces as follows:

Since the ManageIQ domain is read only, you will first have to copy the classes/instances to be modified into a writable domain.

  1. Select an instance within the chosen class.
  2. Navigate to Configuration → Edit Selected Instance.
  3. Type the desired email addresses in the to_email_address and from_email_address fields.
  4. Click Save

I did this but still only the requestor gets notified when provisioning from vmware template is approved and when it is completed. No pending request or request denied are sent to requester.

No mail is sent to approver defined in instances in any case

I sent a test mail from manageIQ UI to the address that I have defined in those instances. Just to completely rule out the possibility that there is something wrong with my e-mail routing. Test mail came through beautifully.

What should I check then?

I’m sorry to hear that it is not working properly.

While there are many references to approvers in the provision email methods, unfortunately approver emails are not supported at this time.

The issue you’re experiencing with the provision pending and denied emails is likely the result of an automate model issue that has been resolved, but is not yet available.

You can apply the automate model change manually by the following:

  • Edit the /MyDomain/system/policy/request_denied instance

    change this value: /{/#ae_provider_category}/Provisioning/{/#miq_request.type}/Email/${/#miq_request.type}_Denied

    to this:

  • Edit the /MyDomain/system/policy/request_pending instance

change this value: /{/#ae_provider_category}/Provisioning/{/#miq_request.type}/Email/${/#miq_request.type}_Pending

to this:

  • Create a new /MyDomain/system/policy/miqprovisionrequest_denied instance

Add this as relationship5 value:

  • Create a new /MyDomain/system/policy/miqprovisionrequest_pending instance

    Add this as relationship5 value: /${/#ae_provider_category}/VM/Provisioning/Email/MiqProvisionRequest_pending

Please let me know if you have any questions.

It works perfectly! Thank you!

Can you also walk me through how to enable email notifications when reconfiguring VM?

That’s great! I’m so glad to hear that it’s working for you.

We don’t currently have any email notifications setup for reconfiguring a VM, but you could modify your domain to add notifications.

For example, To add a VmReconfigureRequest_Approved email notification:

  1. Add a /system/policy instance:

    specify relationship5 value:

  2. Add a new /Infrastructure/VM/Operations/Email instance:

    specify method1 value:

  3. Copy the Infrastructure/VM/Provisioning/Email/MiqProvisionRequest_Approved method
    to: /Infrastructure/VM/Operations/Email/VmReconfigureRequest_Approved.

  4. Edit the /Infrastructure/VM/Operations/Email/VmReconfigureRequest_Approved method to change the email body.

You could follow the above steps for additional instances like:

Working like a charm. You are the best! Thank you!

My pleasure. That’s really great news!

An old posting on the downstream product also covers this topic,