Mario Hammer
Mario Hammer

Reputation: 41

Problem with booleans in CloudWatch Metric Filters

is it possible that aws CloudWatch Metric Filters do not handle boolean values? Example JSON:

    {
    "data": {
        "allMatch": true,
        "level": "INFO",
        "results": [
            {
                "expectedResult": 200,
                "matchesExpected": true,
                "result": 200,
                "type": "http-status"
            }
        ]
    },
    "stream": "stdout",
    "time": "2022-09-29T14:09:00.959390386Z"
}

I have tried several metric filters: { $.data.allMatch = true }, { $.data.allMatch = "true" }, { $.data.allMatch = 1 }, and none returns any event.

Upvotes: 1

Views: 623

Answers (1)

Mario Hammer
Mario Hammer

Reputation: 41

{ $.data.allMatch IS TRUE } did the job...

Upvotes: 3

Related Questions