Skip to content

Separate library for MCA monitoring generated with MCA CLI.

License

Notifications You must be signed in to change notification settings

nordcloud/mca-monitoring

Repository files navigation

MCA monitoring library

Separate library for MCA monitoring generated with MCA CLI.

Developing

It is important to use at least v14.15 for aws-cdk v2 to work.

  1. nvm use
  2. npm install
  3. npm run start

Commits should use Conventional Commits format for changelog generation and versioning.

Release

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:

  1. Run git checkout master to ensure you are on the master branch
  2. Run git pull to pull the latest changes
  3. Run npm run release to create tags and update changelog
  4. Run git push --follow-tags origin master to push the tags
  5. Run npm pack to create a release package
  6. Go go GitHub and draft a new release
  7. Select the tag that was just created
  8. Upload the mca-cli-[version].tgz file created from npm pack
  9. Publish the release

Documentation

HTML documentation can be build with npm run docs. Generated files can be found in docs folder.


What is this package used for?

mca-monitoring and mca-cli are used together to setup monitoring for resources in an AWS environment.

What is monitoring in AWS?

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.

What does mca-monitoring do?

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.