MENU
      GetMetricsGroupList

        GetMetricsGroupList


        Article summary

        Available in Classic and VPC

        Get the entire rule template (monitoring item group) information for a service (product).

        Request

        This section describes the request format. The method and URI are as follows:

        MethodURI
        GET/cw_fea/real/cw/api/rule/group/metrics/query/{prodKey}

        Request headers

        For information about the headers common to all Cloud Insight APIs, see Cloud Insight request headers.

        Request path parameters

        You can use the following path parameters with your request:

        FieldTypeRequiredDescription
        prodKeyStringRequiredProduct key (cw_key)

        Request example

        The request example is as follows:

        curl --location --request GET 'https://cw.apigw.ntruss.com/cw_fea/real/cw/api/rule/group/metrics/query/*************' \
        --header 'x-ncp-apigw-timestamp: {Timestamp}' \
        --header 'x-ncp-iam-access-key: {Access Key}' \
        --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
        Shell

        Response

        This section describes the response format.

        Response body

        The response body includes the following data:

        FieldTypeRequiredDescription
        metricsGroupsArray-Rule template list

        metricsGroups

        The following describes metricsGroups.

        FieldTypeRequiredDescription
        createTimeInteger-Rule template creation date and time (millisecond)
        • Unix timestamp format
        domainCodeString-NAVER Cloud Platform domain code
        groupDescString-Rule template description
        groupNameString-Rule template name
        idString-Rule template ID
        idDimensionString-Dimension name
        metricsArray-Metric list
        prodKeyStringRequiredProduct key (cw_key)
        prodTypeString-Product type
        regionCodeString-Region code
        temporaryGroupBoolean-Whether to create rule template
        • true | false
          • true: Create event rules without creating a rule template
          • false: Create rule template
        updateTimeInteger-Rule template modification date and time (millisecond)
        • Unix timestamp format

        metrics

        The following describes metrics.

        FieldTypeRequiredDescription
        optionsObject-Aggregation method
        • Displayed in the form of "Aggregation cycle": [Aggregation function]
          • Aggregation cycle: Min1 | Min5 | Min30 | Hour2 | Day1
          • Aggregation function: COUNT | SUM | MAX | MIN | AVG
        Note

        See MetricsGroupItem for more information about the fields related to metric group information.

        Response status codes

        For response status codes common to NAVER Cloud Platform, see Cloud Insight API response status codes.

        Response example

        The response example is as follows:

        {
            "metricsGroups": [
                {
                    "createTime": 1589769312574,
                    "domainCode": "PUB",
                    "groupDesc": "This is a metric group for the test-server.",
                    "groupName": "test-server",
                    "id": "***********",
                    "idDimension": "instanceNo",
                    "metrics": [
                        {
                            "calculation": "AVG",
                            "condition": "EQ",
                            "desc": "network send fail packets average",
                            "dimensions": [
                                {
                                    "dim": "type",
                                    "val": "svr"
                                }
                            ],
                            "duration": 1,
                            "eventLevel": "INFO",
                            "metric": "avg_snd_fail_packt_cnt",
                            "metricGroupItemId": "metricGroupItemId001",
                            "options": {
                                "Min1": [
                                    "COUNT",
                                    "SUM",
                                    "MAX",
                                    "MIN",
                                    "AVG"
                                ],
                                "Min5": [
                                    "COUNT",
                                    "SUM",
                                    "MAX",
                                    "MIN",
                                    "AVG"
                                ],
                                "Min30": [
                                    "COUNT",
                                    "SUM",
                                    "MAX",
                                    "MIN",
                                    "AVG"
                                ],
                                "Hour2": [
                                    "COUNT",
                                    "SUM",
                                    "MAX",
                                    "MIN",
                                    "AVG"
                                ],
                                "Day1": [
                                    "COUNT",
                                    "SUM",
                                    "MAX",
                                    "MIN",
                                    "AVG"
                                ]
                            },
                            "threshold": "0"
                        }
                    ],
                    "prodKey": "**********",
                    "prodType": "system",
                    "regionCode": "KR",
                    "temporaryGroup": false,
                    "updateTime": 1589770306595
                },
                {
                    "createTime": 1589774843799,
                    "domainCode": "PUB",
                    "groupDesc": "This is a metric group (template) for server usage.",
                    "groupName": "Server usage",
                    "id": "***********",
                    "idDimension": "instanceNo",
                    "metrics": [
                        {
                            "calculation": "AVG",
                            "condition": "GT",
                            "dimensions": [
                                {
                                    "dim": "type",
                                    "val": "svr"
                                }
                            ],
                            "duration": 1,
                            "eventLevel": "INFO",
                            "metric": "avg_write_cnt",
                            "metricGroupItemId": "metricGroupItemId002",
                            "threshold": 0.7
                        },
                        {
                            "calculation": "AVG",
                            "condition": "GT",
                            "dimensions": [
                                {
                                    "dim": "type",
                                    "val": "svr"
                                }
                            ],
                            "duration": 1,
                            "eventLevel": "INFO",
                            "metric": "avg_cpu_used_rto",
                            "metricGroupItemId": "metricGroupItemId003",
                            "threshold": 1
                        }
                    ],
                    "prodKey": "**********",
                    "prodType": "system",
                    "regionCode": "KR",
                    "temporaryGroup": false,
                    "updateTime": 1589774843799
                }
            ]
        }
        JSON

        Was this article helpful?

        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.