Zabbix/AutoDiscovery/検討/AWS?
2019-11-10

aws cliより

list-metrics

#sh(bash){{

aws cloudwatch list-metrics --namespace "AWS/Lambda"

}}

{
    "Metrics": [
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "ConcurrentExecutions",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func1-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Throttles",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func1-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Duration",
            "Dimensions": []
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Invocations",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func1-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Invocations",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func1-name"
                },
                {
                    "Name": "Resource",
                    "Value": "func1-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "ConcurrentExecutions",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func1-name"
                },
                {
                    "Name": "Resource",
                    "Value": "func1-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Duration",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func1-name"
                },
                {
                    "Name": "Resource",
                    "Value": "func1-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Errors",
            "Dimensions": []
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "ConcurrentExecutions",
            "Dimensions": []
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Errors",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func1-name"
                },
                {
                    "Name": "Resource",
                    "Value": "func1-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Invocations",
            "Dimensions": []
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Errors",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func1-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Throttles",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func1-name"
                },
                {
                    "Name": "Resource",
                    "Value": "func1-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Duration",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func1-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Throttles",
            "Dimensions": []
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "UnreservedConcurrentExecutions",
            "Dimensions": []
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Errors",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func2-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Invocations",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func2-name"
                },
                {
                    "Name": "Resource",
                    "Value": "func2-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Throttles",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func2-name"
                },
                {
                    "Name": "Resource",
                    "Value": "func2-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Throttles",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func2-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Duration",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func2-name"
                },
                {
                    "Name": "Resource",
                    "Value": "func2-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Duration",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func2-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Invocations",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func2-name"
                }
            ]
        },
        {
            "Namespace": "AWS/Lambda",
            "MetricName": "Errors",
            "Dimensions": [
                {
                    "Name": "FunctionName",
                    "Value": "func2-name"
                },
                {
                    "Name": "Resource",
                    "Value": "func2-name"
                }
            ]
        }
    ]
}

メトリクス(状況)

ConcurrentExecutionsaws.lambda.concurrent_executions[{#FUNCNAME}]
Throttlesaws.lambda.throttles[{#FUNCNAME}]
Duration
Invocations
Errors
UnreservedConcurrentExecutions
DeadLetterErrors
IteratorAge

キー名の制限:https://www.zabbix.com/documentation/2.2/jp/manual/config/items/item/key

ディメンジョン

正式名称マクロ名意味
FunctionNameFUNCNAMELambda関数
ResourceRESOURCE関数リソース
ExecutedVersionEXECVER関数のランタイムバージョン

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/monitoring-functions-metrics.html

get-metric-data

#sh(bash){{
aws cloudwatch get-metric-data --metric-data-queries=file://./metric-data-query.json --start-time "2019-11-10T21:00:00Z" --end-time "2019-11-10T21:05:00"
}}

{
    "MetricDataResults": [
        {
            "Id": "metric1",
            "Label": "Errors",
            "Timestamps": [],
            "Values": [],
            "StatusCode": "Complete"
        }
    ],
    "Messages": []
}

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2019-11-11 (月) 07:49:50