Separate library for MCA monitoring generated with MCA CLI.
It is important to use at least v14.15 for aws-cdk v2 to work.
nvm use
npm install
npm run start
Commits should use Conventional Commits format for changelog generation and versioning.
mca-monitoring
uses standard-version to make the version bump, add tags and update the CHANGELOG automatically based on conventional commit messages.
Follow these steps to create a new release:
- Run
git checkout master
to ensure you are on the master branch - Run
git pull
to pull the latest changes - Run
npm run release
to create tags and update changelog - Run
git push --follow-tags origin master
to push the tags - Run
npm pack
to create a release package - Go go GitHub and draft a new release
- Select the tag that was just created
- Upload the mca-cli-[version].tgz file created from
npm pack
- Publish the release
HTML documentation can be build with npm run docs
. Generated files can be found in docs folder.
mca-monitoring and mca-cli are used together to setup monitoring for resources in an AWS environment.
It is a combination of CloudWatch metrics and CloudWatch alarms.
A metric is a statistic. For example, AWS Lambda has an Invocations metric, which counts the number of times a function is invoked.
An alarm observes a single metric and initiates actions when a specified condition is met. The action could send a notification to a SNS topic.
It is a dependency in the package.json of the monitoring folder that is generated by mca-cli. When running the deploy script from the that folder, the mca-monitoring package creates an AWS CDK application, which reads the config.yml file, generated by mca-cli, and creates a CloudFormation template, which is deployed and the CloudWatch alarms are provisioned.