Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. Open the CloudWatch dialog

  2. Click on Logs, select the

...

  1. cfn-logs

...

  1. in

...

  1. the

...

  1. Log

...

  1. Groups

...

  1. and

...

  1. then

...

  1. click

...

  1. Create

...

  1. Metric

...

  1. Filter.

    Image Added

  2. Use a space delimited Filter Pattern by surrounding the pattern in square brackets – [].
    To detect errors when executing CloudFormation scripts you need to search for ERROR in the first field and Command in the second field, the remaining fields are not relevant so use ellipsis (…) to indicate that. If the sample log data contains your error log data you can click Test Pattern to test it. Otherwise just click Assign Metric.

    Image Added

  3. Change the default Filter Name if you wish and then enter the metric Namespace and Metric Name as indicated below.

    Image Added

  4. The following result will be displayed with the text that's highlighted in red. Click Create Alarm.

    Image Added

  5. Enter a Name and Description. This description is "Error has occurred creating or updating the stack". The alarm needs to be displayed as soon as possible so it is set to a single error line in one period and the period is 1 minute. Then click on New List if you haven't already got a notification list.

    Image Added

  6. Enter the name of your topic like LansaAdmin and enter some email addresses separated by commas. Note that you may enlarge the email list by dragging the bottom right hand corner as indicated by the arrow. Then click Create Alarm.

    Image Added

  7. This alarm is now ready to send an email to the list you created whenever there is an installation error in the LANSA Stack. There is one issue: the alarm will be listed under INSUFFICIENT. This is because the filter rarely matches any data at all. Only when there is an error. So another filter needs to be created that matches on all data but uses a Metric Value of zero so it does not affect the statistics.

  8. So, create another filter on the cfn-logs Log Group and enter no pattern. Just click Assign Metric.

  9. Enter the same Metric Namespace and Metric Name as for the previous filter, but set the Metric Value to 0.

  10. The cfn logs update about once per minute and hence will always have data points.