empty get-metric-statistics

0

get-metric-statistics returns no results while cloud watch console shows data. I run

aws cloudwatch get-metric-statistics --namespace "AWS/Usage" --metric-name "ResourceCount" --start-time 2022-02-28T11:30:00Z --end-time 2022-02-28T14:50:00Z --period 60 --statistics Average --dimensions "Name=Type,Value=Resource"

The metric is

{
    "view": "timeSeries",
    "stacked": false,
    "region": "us-west-2",
    "stat": "Average",
    "period": 300,
    "metrics": [
        [ { "expression": "SELECT AVG(ResourceCount) FROM SCHEMA(\"AWS/Usage\") WHERE Type = 'Resource' AND Resource = 'vCPU' AND Service = 'EC2' AND Class = 'Standard/OnDemand'", "label": "", "id": "q1" } ],
        [ "AWS/Usage", "ResourceCount", "Type", "Resource", "Resource", "vCPU", "Service", "EC2", "Class", "Standard/OnDemand", { "id": "m1" } ]
    ]
}
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen