Skip to content

Setup Templates


Overview

Notifications is a managed services that offers reliable, scalable and cost-effective email, SMS notifications. It enables users to get notified when critical events take place in production environment.

CloudAEye support notifications via email, sms. This topic describes how user may setup an email or sms template.

Create a Template

CloudAEye ships with default templates so that everything works out-of-the-box.

Default Email Template

{
  "subject": "[Alert] {{givenName}}, CloudAEye detected an anomaly detected in logs !"
  "bodyText": "\nLogs Alert !\n\nHi {{givenName}},\n\nSome of your applications might be experiencing some serious issues !\n\nSummary\n\nApp Name: {{appName}}\nIssue Id : {{errorId}}.\n\nView complete details in your dashboard \n{{dashboardUrl}}\n\nIf you have any questions, just drop an email to info@cloudaeye.com\n\nCheers,\nTeam CloudAEye"
  "bodyHtml":"<html> <body style=\"background-color: #f7f7f7; margin: 0 !important; padding: 0 !important;\"> <table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"container-for-gmail-android\" width=\"100%\"> <tr> <td align=\"center\" valign=\"top\" width=\"100%\" style=\"background-color: #f7f7f7; padding: 20px 0 0;\"> <table cellspacing=\"0\" cellpadding=\"0\" width=\"600\" class=\"w320\"> <tr style=\" font-family: Helvetica, Arial, sans-serif; font-size: 14px;\"> <td class=\"mobile-header-padding-left\" style=\"vertical-align: middle; width: 290px; text-align: center; padding-left: 10px;\"> <a href=\"https://www.cloudaeye.com\" style=\"text-decoration:none;\"> <img height=\"30\" width=\"30\" style=\"display: inline-block; vertical-align: middle;\" src=\"https://cae-public-assets.s3.us-east-2.amazonaws.com/static/images/logo-square-cyan-blue.png\" alt=\"logo\"/> <h2 style=\"display: inline-block; vertical-align: middle; color: #777777; padding: 0 0 0 10px;\">CloudAEye</h2> </a> </td> </tr> <tr> <td class=\"mini-block-container\" style=\"padding: 30px 10px; width: 500px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #777777; line-height: 21px;\"> <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"  style=\"border-collapse:separate !important;\"> <tr> <td style=\"background-color: #ffffff; width: 498px; border: 1px solid #cccccc; border-radius: 5px; padding: 60px 75px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #777777; line-height: 21px;\"> <table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"> <tr> <td style=\"font-size: 28px; font-weight: 400; line-height: normal; padding: 5px 0 0; color: #4d4d4d; font-family: Helvetica, Arial, sans-serif; text-align: center; line-height: 21px;\"> Logs Alert !  <br/> <br/> <hr style=\"color: #ffffff\"/> </td> </tr> <tr> <td style=\"width: 100% !important; padding: 40px 0px 40px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #777777; line-height: 21px;\"> Hi <b style=\"color: #338be3;\">{{givenName}}</b>, <br/> <br/> Some of your apps might be experiencing some serious issues! </td> </tr> <tr> <td style=\"padding-bottom: 30px; font-family: Helvetica, Arial, sans-serif; font-size: 18px; color: #777777; text-align: center; line-height: 21px;\"> <b>Issue Summary</b> </td> </tr> <tr> <td style=\"padding-bottom: 20px 20px 20px 20px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #777777; line-height: 21px;\"> App Name: <span style=\"font-weight:700; color: #338be3;\">{{appName}}</span> </td> </tr> <tr> <td style=\"padding-bottom: 20px 20px 20px 20px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #777777; line-height: 21px;\"> Error Id: <span style=\"font-weight:700; color: #338be3;\">{{errorId}}</span> </td> </tr> <tr> <td style=\"padding: 40px 0 40px 0; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #777777; text-align: center; line-height: 21px;\"> <div> <a href=\"{{dashboardUrl}}\" style=\"background-color:#338be3; padding: 10px 0px 10px 10px; border: 2px solid #338be3;border-radius:5px;display:inline-block;font-family:'Cabin', Helvetica, Arial, sans-serif;font-size:14px;font-weight:regular;line-height:15px;text-align:center;text-decoration:none;width:255px;-webkit-text-size-adjust:none;\"> <img height=\"40\" width=\"40\" style=\"display: inline-block; vertical-align: middle;\" src=\"https://cae-public-assets.s3.us-east-2.amazonaws.com/static/images/kibana-logo.png\" alt=\"logo\"/> <p style=\"display: inline-block; vertical-align: middle; color: #ffffff; padding: 0 0 0 5px;\">View in Dashboard</p> </a> </div> </td> </tr> <tr> <td style=\"padding-bottom: 30px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #777777; line-height: 21px;\"> If you have any questions, just drop an email to <span style=\"font-weight:700; color: #338be3;\"> <a href=\"mailto:info@cloudaeye.com\" target=\"_blank\" style=\"color: #338be3; text-decoration:none\">info@cloudaeye.com</a> </span> </td> </tr> <tr> <td style=\"padding-bottom: 30px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #777777; line-height: 21px;\"> Cheers <br/> Team <span style=\"font-weight:700; color: #338be3;\">CloudAEye</span> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td align=\"center\" valign=\"top\" width=\"100%\" style=\"background-color: #f7f7f7; height: 100px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #777777; text-align: center; line-height: 21px;\"> <center> <table cellspacing=\"0\" cellpadding=\"0\" width=\"600\" class=\"w320\"> <tr> <td style=\"padding: 25px 0 25px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #777777; text-align: center; line-height: 21px;\"> <strong>CloudAEye Inc</strong> <br /> Bay Area, USA <br /> </td> </tr> </table> </center> </td> </tr> </table> </body> </html>"
}

The following params are replaced automatically:

  • givenName
  • familyName
  • appName
  • errorId
  • dashboardUrl

Default SMS Template

{
  "bodyText": "Hi {{givenName}},\n\nSome of your applications might be experiencing some serious issues !\n\nSummary\n\nApp Name: {{appName}}\nIssue Id : {{errorId}}.\n\nView complete details in your dashboard \n{{dashboardUrl}}"
}
The following params are replaced automatically:

  • givenName
  • familyName
  • appName
  • errorId
  • dashboardUrl

SMS template typically not long in length

Create a New Template

You may override the default templates by setting up your own templates.

First, create the template you want to use for a particular medium (email or sms). You may create the new JSON file by updating the default template.

After that, use the notifications create-template command to create that template in the system.

For example, the following command creates a new email template.

caeops notifications create-template --template-name=myEmailTemplate --medium=email --template-file=myEmailTemplate.json

Delete a Template

If you are not using a template, you may delete it using the delete-template subcommand.

For example,

caeops notifications delete-template --template-name=myEmailTemplate --medium=email

View a Template

If you want to view an existing template, you may use the get-template subcommand. Please specify --medium option to specify the type of template you want to see.

caeops notifications get-template --template-name=myEmailTemplate --medium=email

List All Templates

If you want to see see all email or sms templates in the system, you use the list subcommand.

For example, the following shows all email tempaltes.

caeops notifications list-templates --medium=email