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.