The Custom Application alerts only work on CloudHub accounts that have an enterprise-version license. In trail versions or partner licenses, you can receive platform alerts but not Custom Application alerts.
Anypoint Platform (Do not confuse with API Manager alerts) sends email alerts based on certain events. The events can be generated by platform (standard alerts) when:
· An application exceeds a specific number of events processed within a specified period of time (For example, 1,000 invocations in 10 minutes)
· A deployment is successful or a failure occurs
The worker monitoring system notifies CloudHub about a problem with a worker on an application (High CPU Usage, Memory Usage). Then, a server is disconnected or deleted, or a CloudHub-connected application (custom application alerts) is deployed with an error/warning.
There are certain limitations for the platform alerts, excluding the alerts that can be generated by platform but including the number of emails that can be generated.
For alerts generated via CloudHub connector (custom application alerts), there are five alerts per second for each IP Address (a worker is associated with an IP Address). If an application is deployed onto multiple workers, each has a separate IP address.
One email is generated every 2.5 seconds per organization. This limit is enforced by a mix of organization, environment, alert (name or ID) and resource (application, server, server group or cluster).
The alerts are created/configured under Runtime Manager. Go to your Runtime Manager, and in the environment that you would like to create (Sandbox, Production, QA, etc.), select an application type. You can choose CloudHub application or Hybrid application. Choose CloudHub application. Then, you can choose all applications or one application.
The next step is to choose the condition for the alert. For the custom alerts that are being published from applications using CloudHub connector, select the custom application notification.
From there, select the priority and contains. You can select any or the Priority of Info, warning/error. The same priority has to be selected on CloudHub connector when developing Mule flow.
After that, place a string in the contains options. This string should be part of the notification message you are sending from the Mule application on CloudHub connector, in order to generate an alert.
You can leave the rest of the fields with default value, and you can change the subject or contents of the email message.
Under recipients, you can enter a CloudHub name or manually enter an email address, before selecting submit and launching an alert.
Remember, even though you can create custom alerts, you will not receive emails for custom application alerts in trail accounts. It must be an enterprise-licensed account to avoid an invalid credentials error.
Creating a New Flow
To create a new Mule flow in Anypoint Studio, add CloudHub connector to your modules by downloading from the exchange. Search for CloudHub, and add the CloudHub connector module to your workspace.
Now, you can create a notification anywhere in your Mule flow. However, there are the limits stated above.
You can copy and paste the xml into your configuration to obtain project configuration, before creating a new file by name and common properties. Then, you will be ready to replace a generic username with your CloudHub login and password, before securing a properties configuration.
Finally, you can deploy the code in your location or in CloudHub. The transform message will create a JSON message within the contains property on the previously created alert.
You will receive an email notification.
You can also configure various alerts for standard platform events like:
· CPU Usage
· Exceeds event traffic threshold
· Memory usage – CloudHub
· Deployment failed
· Deployment success
· Secure data gateway connected
· Secure data gateway disconnected
· Worker not responding
These will work on the trail version or the partner accounts of CloudHub.
For more information on any of the above and more, contact Archima Solutions at (201) 431-7552.