[SOLVED] Provision Notification emails


#1

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.


#2

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

#3

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.


#4

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:
/ManageIQ/cloud/vm/provisioning/email
/ManageIQ/infrastructure/vm/provisioning/email
/ManageIQ/service/provisioning/email

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

#5

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
/Mydomain/cloud/vm/provisioning/email
/Mydomain/infrastructure/vm/provisioning/email
/Mydomain/service/provisioning/email

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?


#6

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:
    /System/Policy/${/#miq_request.type}_denied

  • 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:
/System/Policy/${/#miq_request.type}_pending

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

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

  • 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.


#7

It works perfectly! Thank you!


#8

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


#9

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


#10

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:
    /System/Policy/VmReconfigureRequest_Approved

    specify relationship5 value:
    /Infrastructure/VM/Operations/Email/VMReconfigureRequest_Approved

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

    specify method1 value:
    VMReconfigureRequest_Approved

  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:
/System/Policy/VmReconfigureRequest_Denied
/System/Policy/VmReconfigureRequest_Rejected
/System/Policy/VmReconfigureRequest_Starting


#11

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


#12

My pleasure. That’s really great news!


#13

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

thanks