Description
To install the monitoring agent automatically when creating a CVM instance, omit disable_monitor_service or set it to false.
Potential impact
If no agent or alternative collector supplies the metrics you need, resource shortages and performance problems can go unnoticed.
Remediation
After deployment, verify that fresh instance metrics arrive and required alerts work. Changing this setting on an existing instance can reinstall its operating system. Check the plan and your recovery arrangements before applying it.
Examples
The first example sets true to skip automatic installation. The second uses the default. Select an image and instance type supported in the target availability zone.
Before
hcl
resource "tencentcloud_instance" "app" {
instance_name = "app"
availability_zone = "ap-guangzhou-7"
image_id = "img-9qrfy1xt"
instance_type = "S5.MEDIUM4"
disable_monitor_service = true
}
After
hcl
resource "tencentcloud_instance" "app" {
instance_name = "app"
availability_zone = "ap-guangzhou-7"
image_id = "img-9qrfy1xt"
instance_type = "S5.MEDIUM4"
}