AWS CloudWatch Metrics alert rule - Multiple FunctionNames for single alert

  • What Grafana version and what operating system are you using?
    Version 10

  • What are you trying to achieve?
    Using a single Grafana alert rule to capture errors > 0 for a list of FunctionNames rather than a single alert for each FunctionName. I can set a FunctionName of “*” but I’d like instead a list. It looks like I can’t do that directly in the FunctionName, I’ve tried multiple queries and using Math to reduce but that also isn’t working. I’ve tried using a CloudWatch metrics Metrics Search:

    SEARCH(‘{AWS/Lambda,FunctionName} MetricName=“Errors” FunctionName=“lambda-function1” OR FunctionName=“lambda-function2” OR FunctionName=“lambda-function3”’, ‘Sum’, 86400)

    I’m looking for an approach to reduce the number of total alerts I have.

Approach:
Query A: CloudWatch query where FunctionName of "*"
Query B: List of selected Function names as CSV (e.g. CSV Content via Test Datasource)

Expression(s): you need to “join” results of A and B, so only selected Function names will be in the result for Alert condition.

Discuss with Grot how to implement that expression.