Up-to-date reference of API arguments for CES Metric Data v1 you can get at documentation portal
opentelekomcloud_ces_metric_data_v1¶
Manages a V1 CES Metric Data (used for reporting custom monitoring data) resource within OpenTelekomCloud.
Example Usage¶
Basic metric data usage¶
variable instance_id {}
resource "opentelekomcloud_ces_metric_data_v1" "metric_1" {
metric {
namespace = "TEST.TF_ACC"
metric_name = "cpu_util"
dimensions {
name = "instance_id"
value = var.instance_id
}
}
ttl = 172800
collect_time = 1257894000000
value = 0.09
unit = "%"
type = "float"
}
Argument Reference¶
The following arguments are supported:
metric
- (Required, List, ForceNew) Specifies the metric data. The structure is described below.ttl
- (Required, Integer, ForceNew) Specifies the data validity period. The unit issecond
. Supported range:1
to604800
. If the validity period expires, the data will be automatically deleted.collect_time
- (Required, Integer, ForceNew) Specifies when the data was collected, which is a UNIX timestamp (ms).-> NOTE: Since there is a latency between the client and the server, the data timestamp to be inserted should be within the period that starts from three days before the current time plus 20s to 10 minutes after the current time minus 20s. In this way, the timestamp will be inserted to the database without being affected by the latency.
value
- (Required, Float, ForceNew) Specifies the monitoring metric data to be added, which can be an integer or a floating point number.unit
- (Optional, String, ForceNew) Specifies the data unit. Supported range:1
to32
type
- (Optional, String, ForceNew) Specifies the enumerated type. Possible values:int
,float
The metric
block supports:
namespace
- (Required, String, ForceNew) Specifies the namespace inservice.item
format.service.item
can be a string of3
to32
characters that must start with a letter and can consists of uppercase letters, lowercase letters, numbers, or underscores (_). In addition, service cannot start withSYS
,AGT
, orSRE
, and namespace cannot beSERVICE.BMS
because this namespace has been used by the system.metric_name
- (Required, String, ForceNew) Specifies the metric ID. Available metrics.dimensions
- (Required, List, ForceNew) Specifies the metric dimension. A maximum of three dimensions are supported.
The dimensions
block supports:
name
- (Required, String, ForceNew) Specifies the dimension name. The value can be a string of1
to32
characters that must start with a letter and can consists of uppercase letters, lowercase letters, numbers, underscores (_), or hyphens (-).value
- (Required, String, ForceNew) Specifies the dimension value. The value can be a string of1
to64
characters that must start with a letter or a number and can consists of uppercase letters, lowercase letters, numbers, underscores (_), or hyphens (-).