Publish custom Metrics

You can publish your own custom metrics in a variety of ways

The example below uses the AWS CLI to publish a metric called throttlecount under the dimension ServerName,ServerType to the observabilityworkshop namespace.

  1. Execute the following command in the terminal on Cloud9 or on your own terminal

This command will publish the metric to CloudWatch Metrics.

aws cloudwatch put-metric-data --metric-name throttlecount --namespace observabilityworkshop --unit Count --value 156 --dimensions ServerName=DemoServer,ServerType=A1
  1. Navigate to CloudWatch in the AWS Management Console.
  2. In the left navigation menu, click Metrics.
  3. Click on the observabilityworkshop Namespace.
  4. Click ServerName, ServerType.

Here you should see the custom metric that you just published.


This concludes this section. You may continue on to the next section.