LambStatus icon indicating copy to clipboard operation
LambStatus copied to clipboard

Custom metrics with no dimensions do not save/display properly

Open mcheshier1 opened this issue 5 years ago • 4 comments

I'm on the latest version. (.64)

To reproduce:

  1. Create a custom metric with no dimensions.
  2. Select the custom metric from the drop-down list. It should look like metric - [].
  3. Click edit.
  4. Return to the selection screen. The DDL that should be populated is not.
  5. Add a dimension to the metric.
  6. Repeat the process. Metric saves as expected.

mcheshier1 avatar Sep 25 '18 06:09 mcheshier1

Thank you for your report, but I can't reproduce the issue.

Maybe I misunderstand some steps. Here are the steps I tried:

  1. Open the metrics page (https://xxxx.cloudfront.net/metrics).
  2. Click '+ Add' button.
  3. Enter the Title (like 'Metric 1').
  4. Click 'Add' button. Now the new metric is created.
  5. Click 'Pencil' icon to edit the metric.
  6. Choose namespace and dimensions.
  7. Click 'Edit' button. Now the metric is updated.
  8. Click 'Pencil' icon again.

After these steps, it looks like the new namespace and dimensions are saved correctly.

ks888 avatar Sep 28 '18 10:09 ks888

Hi ks888, did you point it at a metric with no dimensions? It should look like - []. Also the metric should show up under 'Metrics with no dimensions' in a custom namespace in Cloudwatch.

mcheshier1 avatar Oct 03 '18 23:10 mcheshier1

@mcheshier1 Running into the same issue here, did you find a workaround? Does it make sense to add a dimension?

jkrenge avatar Feb 07 '19 17:02 jkrenge

If anyone stumbles upon this: An easy fix is to reuse your existing namespace and metric name for the dimension, then you'll be able to add them to LambStatus. In Node I'm using sth like this:

  var params = {
    MetricData: [
      {
        MetricName: metric,
        Timestamp: new Date(),
        Unit: 'Count',
        Value: value,
        Dimensions: [{
          Name: 'MyMetric',
          Value: metric,
        }],
      },
    ],
    Namespace: 'MyMetric/' + namespace,
  };

  CloudWatch.putMetricData(params, callback);

jkrenge avatar Feb 07 '19 21:02 jkrenge