CreateMetricsGrp
    • PDF

    CreateMetricsGrp

    • PDF

    Article Summary

    概要

    監視項目グループ(テンプレート)を作成します。

    リクエスト

    API URL

    URL: https://cw.apigw.ntruss.com/cw_fea/real/cw/api/rule/group/metrics
    Method: POST
    

    リクエストヘッダ

    共通設定に明示されたリクエストヘッダが必要です。

    Content-Type: application/json
    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    

    リクエストボディ

    CreateOrUpdateMetricsGrpDto

    リクエスト例

    以下は、監視項目グループ(テンプレート)を作成する例です。cw_keyが「xxxxxxxxxxxxxxxxxx」である商品で、「avg_cpu_used_rto」項目が1.5以上のまま1分間維持される場合と、「avg_write_cnt」項目が0.7以上のまま1分間維持される場合に、イベントを発生させるための監視項目グループ(テンプレート)を作成します。

    POST /cw_fea/real/cw/api/rule/group/metrics
    Host: cw.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    
    Payload:
    {
        "groupDesc": "サーバ使用量に対するMetric Group(template)です。",
        "groupName": "サーバ使用量",
        "metricsGroupItems": [
            {
                "calculation": "AVG",
                "condition": "GT",
                "dimensions": [
                    {
                        "dim": "type",
                        "val": "svr"
                    }
                ],
                "duration": 1,
                "eventLevel": "INFO",
                "metric": "avg_cpu_used_rto",
                "threshold": 1
            },
            {
                "calculation": "AVG",
                "condition": "GT",
                "dimensions": [
                    {
                        "dim": "type",
                        "val": "svr"
                    }
                ],
                "duration": 1,
                "eventLevel": "INFO",
                "metric": "avg_write_cnt",
                "threshold": 0.7
            }
        ],
        "prodKey": "xxxxxxxxxxxxxxxxxx"
    }
    
    

    レスポンス例

    エラーなしに正常に作成された場合、作成された監視項目グループ(テンプレート)のidがリターンされます。

    "xxxxxxxxxxxxxxxxxx"
    

    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.