Summing aws/sqs field on dashboard

  • What Grafana version and what operating system are you using?
    Grafana 11.3.0 linux 8

  • What are you trying to achieve?
    I am trying to get a list of AWS/SQS cloud watch queue metrics named ApproximateNumberOfMessagesVisible to be summed and change the status of an icon on a canvas dashboard from green to red when a target is reached.

  • How are you trying to achieve it?
    First, I am able to get the icon to change from green to red on the dashboard on a single target, but I cannot sum from multiple AWS/SQS queues.

I am also using the override option under the canvas, icon and setting the threshold to 100 red and base to green. Further I am using the Fields with name option to reference either the label1-label4 or the alias I set up under transformations(NEWTOTAL).

I am using the transformation Add field from calculation, Reduce row, Operation: label1, label2, label3, label4, label5
Calculation: total
Alias NEWTOTAL

  • What happened?
    When I use a single label, for example label 1, the icon changes color correctly based on the threshold.

When I use the Alias, the icon remains green.

  • What did you expect to happen?
    The icon should change to red when the threshold is reached.

  • Can you copy/paste the configuration(s) that you are having problems with?
    “datasource”: {
    “type”: “cloudwatch”
    “uid”: “Cloudwatch”
    },
    “dimenstions”: {
    “QueueName” “testqueue”
    },
    “expression: “”',
    “hide”: false,
    “id”: “”,
    “label”: “label1”,
    loggroups”:,
    “matchExact”: true,
    “metricEditorMode”: 0,
    “metricName”:ApproximateNumberOfMessagesVisible",
    “metricQueryType”: 0,
    “namesppace”:“AWS/SQS”,
    “period”: “”,
    “queryMode”:“Metrics”,
    refId": “AF”,
    “region”: “associated region”,
    “sqlExpression”: “”,
    “statistic”: “Average”
    }

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were. no

  • Did you follow any online instructions? If so, what is the URL?

I have tried this… listed below

Summing all fields matching certain pattern - Grafana / Dashboards - Grafana Labs Community Forums